Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
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-c
Commits
389923a1
Commit
389923a1
authored
2 years ago
by
David Bühler
Browse files
Options
Downloads
Patches
Plain Diff
[kernel] Ast_diff: checks the type of corresponding global variables.
parent
5a672370
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/kernel_services/ast_queries/ast_diff.ml
+10
-9
10 additions, 9 deletions
src/kernel_services/ast_queries/ast_diff.ml
with
10 additions
and
9 deletions
src/kernel_services/ast_queries/ast_diff.ml
+
10
−
9
View file @
389923a1
...
@@ -1249,8 +1249,6 @@ and is_same_fundec f f' env: body_correspondance =
...
@@ -1249,8 +1249,6 @@ and is_same_fundec f f' env: body_correspondance =
|
`Body_changed
->
()
);
|
`Body_changed
->
()
);
res
res
(* only for locals and formals. Globals are treated by
gvar_correspondance below. *)
and
is_same_varinfo
vi
vi'
env
=
and
is_same_varinfo
vi
vi'
env
=
is_same_type
vi
.
vtype
vi'
.
vtype
env
&&
is_same_type
vi
.
vtype
vi'
.
vtype
env
&&
Cil_datatype
.
Attributes
.
equal
vi
.
vattr
vi'
.
vattr
Cil_datatype
.
Attributes
.
equal
vi
.
vattr
vi'
.
vattr
...
@@ -1373,13 +1371,16 @@ and gvar_correspondance ?loc vi env =
...
@@ -1373,13 +1371,16 @@ and gvar_correspondance ?loc vi env =
end
end
|
None
->
`Not_present
|
None
->
`Not_present
|
Some
vi'
->
|
Some
vi'
->
let
selection
=
State_selection
.
singleton
Globals
.
Vars
.
self
in
if
is_same_varinfo
vi
vi'
env
let
init
=
then
Project
.
on
~
selection
(
Orig_project
.
get
()
)
Globals
.
Vars
.
find
vi
let
selection
=
State_selection
.
singleton
Globals
.
Vars
.
self
in
in
let
init
=
let
init'
=
Globals
.
Vars
.
find
vi'
in
Project
.
on
~
selection
(
Orig_project
.
get
()
)
Globals
.
Vars
.
find
vi
let
res
=
is_same_initinfo
init
init'
empty_env
in
in
if
res
then
`Same
vi'
else
`Not_present
let
init'
=
Globals
.
Vars
.
find
vi'
in
let
res
=
is_same_initinfo
init
init'
empty_env
in
if
res
then
`Same
vi'
else
`Not_present
else
`Not_present
in
in
Varinfo
.
memo
add
vi
Varinfo
.
memo
add
vi
...
...
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