Added method arguments to the lookup context of an ObjC method.

This commit is contained in:
Erik Verbruggen
2009-09-25 12:08:38 +02:00
parent 00f676708b
commit 06fcf59f2e
2 changed files with 14 additions and 0 deletions
+10
View File
@@ -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);
}
}
+4
View File
@@ -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;