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
Tobias Hunger
qt-creator
Commits
98a62c19
Commit
98a62c19
authored
Aug 10, 2010
by
Roberto Raggi
Browse files
Push the function scope as soon as we're done processing the core-declarator.
parent
0f301f86
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/libs/cplusplus/FindUsages.cpp
View file @
98a62c19
...
...
@@ -345,7 +345,7 @@ bool FindUsages::visit(DeclaratorAST *ast)
return
false
;
}
void
FindUsages
::
declarator
(
DeclaratorAST
*
ast
)
void
FindUsages
::
declarator
(
DeclaratorAST
*
ast
,
ScopedSymbol
*
symbol
)
{
if
(
!
ast
)
return
;
...
...
@@ -356,6 +356,9 @@ void FindUsages::declarator(DeclaratorAST *ast)
for
(
PtrOperatorListAST
*
it
=
ast
->
ptr_operator_list
;
it
;
it
=
it
->
next
)
{
this
->
ptrOperator
(
it
->
value
);
}
Scope
*
previousScope
=
switchScope
(
symbol
);
this
->
coreDeclarator
(
ast
->
core_declarator
);
for
(
PostfixDeclaratorListAST
*
it
=
ast
->
postfix_declarator_list
;
it
;
it
=
it
->
next
)
{
this
->
postfixDeclarator
(
it
->
value
);
...
...
@@ -365,6 +368,7 @@ void FindUsages::declarator(DeclaratorAST *ast)
}
// unsigned equals_token = ast->equals_token;
this
->
expression
(
ast
->
initializer
);
(
void
)
switchScope
(
previousScope
);
}
bool
FindUsages
::
visit
(
QtPropertyDeclarationItemAST
*
ast
)
...
...
@@ -1544,8 +1548,8 @@ bool FindUsages::visit(FunctionDefinitionAST *ast)
for
(
SpecifierListAST
*
it
=
ast
->
decl_specifier_list
;
it
;
it
=
it
->
next
)
{
this
->
specifier
(
it
->
value
);
}
Scope
*
previousScope
=
switchScope
(
ast
->
symbol
);
// ### not exactly.
this
->
declarator
(
ast
->
declarator
);
this
->
declarator
(
ast
->
declarator
,
ast
->
symbol
);
Scope
*
previousScope
=
switchScope
(
ast
->
symbol
);
this
->
ctorInitializer
(
ast
->
ctor_initializer
);
this
->
statement
(
ast
->
function_body
);
// Function *symbol = ast->symbol;
...
...
src/libs/cplusplus/FindUsages.h
View file @
98a62c19
...
...
@@ -97,7 +97,7 @@ protected:
void
objCSelectorArgument
(
ObjCSelectorArgumentAST
*
ast
);
void
attribute
(
AttributeAST
*
ast
);
void
declarator
(
DeclaratorAST
*
ast
);
void
declarator
(
DeclaratorAST
*
ast
,
ScopedSymbol
*
symbol
=
0
);
void
qtPropertyDeclarationItem
(
QtPropertyDeclarationItemAST
*
ast
);
void
qtInterfaceName
(
QtInterfaceNameAST
*
ast
);
void
baseSpecifier
(
BaseSpecifierAST
*
ast
);
...
...
Write
Preview
Supports
Markdown
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