Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pub
Frama Clang
Commits
c0c4446f
Commit
c0c4446f
authored
Oct 28, 2021
by
Patrick Baudin
Browse files
Merge remote-tracking branch 'origin/stable/chromium' into feature/patrick/chromium2master
parents
d31be268
0f8e9caa
Changes
1
Hide whitespace changes
Inline
Side-by-side
reorder_defs.ml
View file @
c0c4446f
...
@@ -87,7 +87,8 @@ let kind_of_glob = function
...
@@ -87,7 +87,8 @@ let kind_of_glob = function
|
Tenum
_
->
Enum
|
Tenum
_
->
Enum
|
_
->
Other
)
|
_
->
Other
)
(* TODO: find dependencies also in GLOBANNOT... *)
(* TODO: find dependencies also in GLOBANNOT... *)
|
GLOBASM
_
|
PRAGMA
_
|
LINKAGE
_
|
GLOBANNOT
_
|
CUSTOM
_
->
Other
|
GLOBASM
_
|
PRAGMA
_
|
STATIC_ASSERT
_
|
LINKAGE
_
|
GLOBANNOT
_
|
CUSTOM
_
->
Other
let
name_of_glob
d
=
match
d
with
let
name_of_glob
d
=
match
d
with
|
FUNDEF
(
_
,
(
_
,
(
name
,_,_,_
))
,_,_,_
)
->
name
|
FUNDEF
(
_
,
(
_
,
(
name
,_,_,_
))
,_,_,_
)
->
name
...
@@ -108,7 +109,8 @@ let name_of_glob d = match d with
...
@@ -108,7 +109,8 @@ let name_of_glob d = match d with
Frama_Clang_option
.
fatal
"Unknown type declaration: %a"
Frama_Clang_option
.
fatal
"Unknown type declaration: %a"
Cabs_debug
.
pp_def
d
Cabs_debug
.
pp_def
d
)
)
|
GLOBASM
_
|
PRAGMA
_
|
LINKAGE
_
|
GLOBANNOT
_
|
CUSTOM
_
->
""
|
GLOBASM
_
|
PRAGMA
_
|
STATIC_ASSERT
_
|
LINKAGE
_
|
GLOBANNOT
_
|
CUSTOM
_
->
""
let
has_init
=
List
.
exists
(
function
(
_
,
NO_INIT
)
->
false
|
_
->
true
)
let
has_init
=
List
.
exists
(
function
(
_
,
NO_INIT
)
->
false
|
_
->
true
)
...
@@ -125,7 +127,8 @@ let glob_is_def = function
...
@@ -125,7 +127,8 @@ let glob_is_def = function
|
Tenum
(
_
,
Some
_
,_
)
->
true
|
Tenum
(
_
,
Some
_
,_
)
->
true
|
Tenum
(
_
,
None
,_
)
->
false
|
Tenum
(
_
,
None
,_
)
->
false
|
_
->
false
)
|
_
->
false
)
|
GLOBASM
_
|
PRAGMA
_
|
LINKAGE
_
|
GLOBANNOT
_
|
CUSTOM
_
->
false
|
GLOBASM
_
|
PRAGMA
_
|
STATIC_ASSERT
_
|
LINKAGE
_
|
GLOBANNOT
_
|
CUSTOM
_
->
false
let
decl_of_def
=
function
let
decl_of_def
=
function
|
FUNDEF
(
_
,
(
s
,
n
)
,_,
b
,_
)
->
DECDEF
(
None
,
(
s
,
[
n
,
NO_INIT
])
,
b
)
|
FUNDEF
(
_
,
(
s
,
n
)
,_,
b
,_
)
->
DECDEF
(
None
,
(
s
,
[
n
,
NO_INIT
])
,
b
)
...
@@ -384,7 +387,7 @@ class compute_deps =
...
@@ -384,7 +387,7 @@ class compute_deps =
Dependencies
.
set_symbol
Field
n
false
(
Option
.
get
current_def
)
Dependencies
.
set_symbol
Field
n
false
(
Option
.
get
current_def
)
in
in
List
.
iter
process_name
l
List
.
iter
process_name
l
|
TYPE_ANNOT
_
->
()
|
TYPE_ANNOT
_
|
STATIC_ASSERT_FG
_
->
()
in
in
List
.
iter
process_tag
l
List
.
iter
process_tag
l
|
_
->
()
)
|
_
->
()
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment