diff --git a/src/libs/cplusplus/LookupContext.cpp b/src/libs/cplusplus/LookupContext.cpp index 48053b8b69ce44215ec7cb2c676ec9a5745868bb..6bf59fb44a2b31febb2a297c17ccbe9ddef37ed6 100644 --- a/src/libs/cplusplus/LookupContext.cpp +++ b/src/libs/cplusplus/LookupContext.cpp @@ -466,6 +466,14 @@ void LookupContext::expandFunction(Function *function, } } +void LookupContext::expandObjCMethod(ObjCMethod *method, + const QList<Scope *> &visibleScopes, + QList<Scope *> *expandedScopes) const +{ + if (! expandedScopes->contains(method->arguments())) + expandedScopes->append(method->arguments()); +} + void LookupContext::expand(Scope *scope, const QList<Scope *> &visibleScopes, QList<Scope *> *expandedScopes) const @@ -483,5 +491,7 @@ void LookupContext::expand(Scope *scope, expandBlock(block, visibleScopes, expandedScopes); } else if (Function *fun = scope->owner()->asFunction()) { expandFunction(fun, visibleScopes, expandedScopes); + } else if (ObjCMethod *meth = scope->owner()->asObjCMethod()) { + expandObjCMethod(meth, visibleScopes, expandedScopes); } } diff --git a/src/libs/cplusplus/LookupContext.h b/src/libs/cplusplus/LookupContext.h index ed02f0d29df9ce5ed7f875715de15cd27991034b..d648fa71a781c61c46101d7e91905c5281bce676 100644 --- a/src/libs/cplusplus/LookupContext.h +++ b/src/libs/cplusplus/LookupContext.h @@ -114,6 +114,10 @@ public: const QList<Scope *> &visibleScopes, QList<Scope *> *expandedScopes) const; + void expandObjCMethod(ObjCMethod *method, + const QList<Scope *> &visibleScopes, + QList<Scope *> *expandedScopes) const; + void expandEnumOrAnonymousSymbol(ScopedSymbol *scopedSymbol, QList<Scope *> *expandedScopes) const;