Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
clangml
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
memcad
clangml
Commits
e5859803
Commit
e5859803
authored
4 years ago
by
Thierry Martinez
Browse files
Options
Downloads
Patches
Plain Diff
bootstrapped repository for commit
a6a771dc
parent
a5d7e4e1
No related branches found
No related tags found
No related merge requests found
Pipeline
#218066
failed
4 years ago
Stage: test
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGES.md
+4
-2
4 additions, 2 deletions
CHANGES.md
README.md
+1
-1
1 addition, 1 deletion
README.md
clangml/clang__utils.ml
+18
-14
18 additions, 14 deletions
clangml/clang__utils.ml
with
23 additions
and
17 deletions
CHANGES.md
+
4
−
2
View file @
e5859803
# 2021-02-1
9
, 4.4.0
# 2021-02-
2
1, 4.4.0
-
Support for Clang/LLVM 11.0.1, 11.1.0 and 12.0.0.
-
Support for OCaml 4.12
-
Support for OCaml 4.12.
-
Fix integer overflow on 32-bit platforms.
# 2020-09-22, 4.3.0
...
...
This diff is collapsed.
Click to expand it.
README.md
+
1
−
1
View file @
e5859803
...
...
@@ -105,7 +105,7 @@ The module [`Clang.Ast`] includes in particular the module [`Clang__ast`]
which declares the algebraic data types that represent the AST.
The documentation of most of the nodes contains examples that can be used as references
for how syntactic constructions are parsed, and that are extracted with [
`ocamlcodoc`
]
and serve as unit tests with
`dune runtest`
(or, equivalently,
`make test
s
`
).
and serve as unit tests with
`dune runtest`
(or, equivalently,
`make test`
).
Moreover, the git branch [
`norms`
] contains the AST corresponding to the examples
automatically extracted from C++14, C++17, and C++20 norms.
...
...
This diff is collapsed.
Click to expand it.
clangml/clang__utils.ml
+
18
−
14
View file @
e5859803
...
...
@@ -326,24 +326,28 @@ let int64_of_cxint ?(signed = true) cxint =
else
invalid_arg
"int64_of_cxint"
let
int_of_cxint_opt
?
(
signed
=
true
)
cxint
=
let
int_of_cxint_opt
?
(
signed
=
true
)
cxint
:
int
option
=
(* The result type is always signed, therefore the bit sign is lost when
storing an unsigned value. *)
let
sign_bit
=
if
signed
then
0
else
1
in
let
bits
=
get_bits
~
signed
cxint
in
if
bits
<=
(
if
signed
then
32
else
31
)
then
if
bits
>
Sys
.
int_size
-
sign_bit
then
None
else
let
result
=
if
signed
then
ext_int_get_sext_value
cxint
if
bits
<=
32
-
sign_bit
then
if
signed
then
ext_int_get_sext_value
cxint
else
ext_int_get_zext_value
cxint
else
ext_int_get_zext_value
cxint
in
let
result
=
if
signed
then
ext_int_get_sext_value64
cxint
else
ext_int_get_zext_value64
cxint
in
Int64
.
to_int
result
in
Some
result
else
if
bits
<=
Sys
.
int_size
then
let
result
=
if
signed
then
ext_int_get_sext_value64
cxint
else
ext_int_get_zext_value64
cxint
in
Some
(
Int64
.
to_int
result
)
else
None
let
int_of_cxint
?
(
signed
=
true
)
cxint
=
match
int_of_cxint_opt
~
signed
cxint
with
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment