diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2009-10-13 14:38:37 +0200 |
---|---|---|
committer | con <qtc-committer@nokia.com> | 2009-10-13 14:49:12 +0200 |
commit | 083ea37eb0f44c31f2ecc1011a3a0c99f0c94971 (patch) | |
tree | 98882f7de4a7cf8e63af417ea2c5cf8290ab1c5f | |
parent | 151187006bb1fe5e344e77cc9a5bcd97918a3849 (diff) |
Rename the given enumerator.v1.3.0-beta1.3.0-beta
(cherry picked from commit c33a8e94981f6b1acf2b11aaf04c3e86f6ceea12)
-rw-r--r-- | src/plugins/cpptools/cppfindreferences.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/plugins/cpptools/cppfindreferences.cpp b/src/plugins/cpptools/cppfindreferences.cpp index 03397a655ad..a78087d6a35 100644 --- a/src/plugins/cpptools/cppfindreferences.cpp +++ b/src/plugins/cpptools/cppfindreferences.cpp @@ -168,10 +168,10 @@ protected: bool isDeclSymbol(Symbol *symbol) const { - if (! symbol) + if (! symbol) { return false; - else if (symbol == _declSymbol) { + } else if (symbol == _declSymbol) { return true; } else if (symbol->line() == _declSymbol->line() && symbol->column() == _declSymbol->column()) { @@ -349,6 +349,20 @@ protected: return false; } + virtual bool visit(EnumeratorAST *ast) + { + Identifier *id = identifier(ast->identifier_token); + if (id == _id) { + LookupContext context = currentContext(ast); + const QList<Symbol *> candidates = context.resolve(control()->nameId(id)); + reportResult(ast->identifier_token, candidates); + } + + accept(ast->expression); + + return false; + } + virtual bool visit(SimpleNameAST *ast) { Identifier *id = identifier(ast->identifier_token); |