Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Frama Clang
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
pub
Frama Clang
Commits
ec046034
Commit
ec046034
authored
3 years ago
by
Andre Maroneze
Browse files
Options
Downloads
Patches
Plain Diff
sync with frama-c/frama-c!3182
parent
f335209f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
reorder_defs.ml
+7
-4
7 additions, 4 deletions
reorder_defs.ml
with
7 additions
and
4 deletions
reorder_defs.ml
+
7
−
4
View file @
ec046034
...
@@ -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
|
_
->
()
)
|
_
->
()
)
...
...
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