Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stefan Gränitz
Frama Clang
Commits
83c9806d
Commit
83c9806d
authored
Jul 13, 2021
by
Stefan Gränitz
Browse files
Fix misleading variable name: declKind -> contextKind (NFC)
parent
0d46f6f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
ClangVisitor.cpp
View file @
83c9806d
...
...
@@ -6795,7 +6795,7 @@ bool FramacVisitor::VisitFunctionDecl(clang::FunctionDecl* Decl) {
option
/*statement list */
body
=
opt_none
();
option
/*statement list */
delayedBody
=
NULL
;
option
/* function_contract */
contract
=
opt_none
();
clang
::
Decl
::
Kind
decl
Kind
=
Decl
->
getDeclContext
()
->
getDeclKind
();
clang
::
Decl
::
Kind
context
Kind
=
Decl
->
getDeclContext
()
->
getDeclKind
();
bool
hasParseTemplate
=
false
;
bool
isImplicitFunction
=
false
;
if
(
Decl
->
doesThisDeclarationHaveABody
())
{
...
...
@@ -6826,9 +6826,9 @@ bool FramacVisitor::VisitFunctionDecl(clang::FunctionDecl* Decl) {
{
bool
shouldDelay
=
false
;
list
/*<statement>*/
content
=
makeCodeBlock
(
Decl
->
getBody
(),
Decl
->
getDeclContext
(),
Decl
,
(
decl
Kind
==
clang
::
Decl
::
TranslationUnit
||
decl
Kind
==
clang
::
Decl
::
LinkageSpec
||
decl
Kind
==
clang
::
Decl
::
Namespace
)
?
NULL
:
&
shouldDelay
);
(
context
Kind
==
clang
::
Decl
::
TranslationUnit
||
context
Kind
==
clang
::
Decl
::
LinkageSpec
||
context
Kind
==
clang
::
Decl
::
Namespace
)
?
NULL
:
&
shouldDelay
);
if
(
!
shouldDelay
)
{
free
(
body
);
body
=
opt_some_container
(
content
);
...
...
@@ -6848,9 +6848,9 @@ bool FramacVisitor::VisitFunctionDecl(clang::FunctionDecl* Decl) {
bool
shouldDelay
=
false
;
list
/*<statement>*/
content
=
makeCodeBlock
(
Decl
->
getBody
(),
Decl
->
getDeclContext
(),
Decl
,
(
decl
Kind
==
clang
::
Decl
::
TranslationUnit
||
decl
Kind
==
clang
::
Decl
::
LinkageSpec
||
decl
Kind
==
clang
::
Decl
::
Namespace
)
?
NULL
:
&
shouldDelay
);
(
context
Kind
==
clang
::
Decl
::
TranslationUnit
||
context
Kind
==
clang
::
Decl
::
LinkageSpec
||
context
Kind
==
clang
::
Decl
::
Namespace
)
?
NULL
:
&
shouldDelay
);
if
(
!
shouldDelay
)
{
free
(
body
);
body
=
opt_some_container
(
content
);
...
...
@@ -6876,8 +6876,9 @@ bool FramacVisitor::VisitFunctionDecl(clang::FunctionDecl* Decl) {
}
bool
isGenerationEffective
=
true
;
if
(
declKind
==
clang
::
Decl
::
TranslationUnit
||
declKind
==
clang
::
Decl
::
LinkageSpec
if
(
contextKind
==
clang
::
Decl
::
TranslationUnit
||
contextKind
==
clang
::
Decl
::
LinkageSpec
//|| contextKind == clang::Decl::Namespace
/* !_parents.hasLexicalContext() */
)
{
assert
(
!
delayedBody
);
decl_or_impl_name
decl_name
=
NULL
;
...
...
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