summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2009-10-05 12:36:46 +0200
committerRoberto Raggi <roberto.raggi@nokia.com>2009-10-05 12:37:14 +0200
commitcbf24ab6f4c11b39cdf22f1ff016d3e8697d1678 (patch)
tree0c9bd4ba342f40b41ac790dff8c6e8a7dbb4186d /src
parent13212eef14ad16d29c302f45c61dce6b6d0e630f (diff)
downloadqt-creator-cbf24ab6f4c11b39cdf22f1ff016d3e8697d1678.tar.gz
Don't look at formal arguments.
Diffstat (limited to 'src')
-rw-r--r--src/plugins/cpptools/cppfindreferences.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/plugins/cpptools/cppfindreferences.cpp b/src/plugins/cpptools/cppfindreferences.cpp
index 852150e7a8..03409b52c9 100644
--- a/src/plugins/cpptools/cppfindreferences.cpp
+++ b/src/plugins/cpptools/cppfindreferences.cpp
@@ -364,6 +364,34 @@ protected:
return false;
}
+ virtual bool visit(ParameterDeclarationAST *ast)
+ {
+ for (SpecifierAST *spec = ast->type_specifier; spec; spec = spec->next)
+ accept(spec);
+
+ if (DeclaratorAST *declarator = ast->declarator) {
+ for (SpecifierAST *attr = declarator->attributes; attr; attr = attr->next)
+ accept(attr);
+
+ for (PtrOperatorAST *ptr_op = declarator->ptr_operators; ptr_op; ptr_op = ptr_op->next)
+ accept(ptr_op);
+
+ // ### TODO: well, not exactly. We need to look at qualified-name-ids and nested-declarators.
+ // accept(declarator->core_declarator);
+
+ for (PostfixDeclaratorAST *fx_op = declarator->postfix_declarators; fx_op; fx_op = fx_op->next)
+ accept(fx_op);
+
+ for (SpecifierAST *spec = declarator->post_attributes; spec; spec = spec->next)
+ accept(spec);
+
+ accept(declarator->initializer);
+ }
+
+ accept(ast->expression);
+ return false;
+ }
+
private:
QFutureInterface<Utils::FileSearchResult> *_future;
Identifier *_id; // ### remove me