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
a4052d27
Commit
a4052d27
authored
5 years ago
by
Virgile Prevosto
Committed by
Andre Maroneze
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[kernel] Fixes Kernel_function.var_is_in_scope
parent
cbe830e7
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_data/kernel_function.ml
+6
-1
6 additions, 1 deletion
src/kernel_services/ast_data/kernel_function.ml
with
6 additions
and
1 deletion
src/kernel_services/ast_data/kernel_function.ml
+
6
−
1
View file @
a4052d27
...
...
@@ -536,7 +536,12 @@ let var_is_in_scope stmt vi =
let
sdef
=
local_definition
(
find_englobing_kf
stmt
)
vi
in
match
b
.
bstmts
with
|
[]
->
assert
false
(* at least contains stmt *)
|
sfst
::
_
->
is_between
b
sfst
sdef
stmt
|
sfst
::
_
->
(* if sfst is sdef (or an unspecified sequence containing sdef), it
is necessarily above stmt. Otherwise, we can rely on is_between to
check that. *)
Cil_datatype
.
Stmt
.
equal
sfst
(
find_enclosing_stmt_in_block
b
sdef
)
||
is_between
b
sfst
sdef
stmt
in
List
.
exists
(
fun
b
->
...
...
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