Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
9f49cd05
Commit
9f49cd05
authored
Sep 29, 2009
by
Roberto Raggi
Browse files
Handle mem initializers.
parent
6b4db9e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/cpptools/cppfindreferences.cpp
View file @
9f49cd05
...
...
@@ -168,13 +168,37 @@ protected:
return
LookupContext
(
lastVisibleSymbol
,
_exprDoc
,
_doc
,
_snapshot
);
}
void
ensureNameIsValid
(
NameAST
*
ast
)
{
if
(
ast
&&
!
ast
->
name
)
ast
->
name
=
_sem
.
check
(
ast
,
/*scope = */
0
);
}
virtual
bool
visit
(
MemInitializerAST
*
ast
)
{
if
(
ast
->
name
&&
ast
->
name
->
asSimpleName
()
!=
0
)
{
ensureNameIsValid
(
ast
->
name
);
SimpleNameAST
*
simple
=
ast
->
name
->
asSimpleName
();
qDebug
()
<<
identifier
(
simple
->
identifier_token
)
<<
_id
;
if
(
identifier
(
simple
->
identifier_token
)
==
_id
)
{
LookupContext
context
=
currentContext
(
ast
);
const
QList
<
Symbol
*>
candidates
=
context
.
resolve
(
simple
->
name
);
if
(
checkCandidates
(
candidates
))
reportResult
(
simple
->
identifier_token
);
}
}
accept
(
ast
->
expression
);
return
false
;
}
virtual
bool
visit
(
PostfixExpressionAST
*
ast
)
{
_postfixExpressionStack
.
append
(
ast
);
return
true
;
}
virtual
void
endVisit
(
PostfixExpressionAST
*
ast
)
virtual
void
endVisit
(
PostfixExpressionAST
*
)
{
_postfixExpressionStack
.
removeLast
();
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment