aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaLookup.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-02-16 01:39:26 +0000
committerDouglas Gregor <dgregor@apple.com>2011-02-16 01:39:26 +0000
commitd98abd8c68bd96e111a0bebdb90f38cf2a5632a2 (patch)
treee16eb093f8fa3f227fe36e461405c0f5594cea59 /lib/Sema/SemaLookup.cpp
parent34753802931fddcf57bd62c5b83bdca1a23017d7 (diff)
When searching for visible declarations (e.g., for code completion),
be sure to look at all of the Objective-C class declarations within a @class. Fixes <rdar://problem/8876207>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125635 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaLookup.cpp')
-rw-r--r--lib/Sema/SemaLookup.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp
index ec633d177c..68eccfc280 100644
--- a/lib/Sema/SemaLookup.cpp
+++ b/lib/Sema/SemaLookup.cpp
@@ -2484,7 +2484,17 @@ static void LookupVisibleDecls(DeclContext *Ctx, LookupResult &Result,
Visited.add(*P);
}
}
+ } else if (ObjCClassDecl *Class = dyn_cast<ObjCClassDecl>(*D)) {
+ for (ObjCClassDecl::iterator I = Class->begin(), IEnd = Class->end();
+ I != IEnd; ++I) {
+ ObjCInterfaceDecl *IFace = I->getInterface();
+ if (Result.isAcceptableDecl(IFace)) {
+ Consumer.FoundDecl(IFace, Visited.checkHidden(IFace), InBaseClass);
+ Visited.add(IFace);
+ }
+ }
}
+
// Visit transparent contexts and inline namespaces inside this context.
if (DeclContext *InnerCtx = dyn_cast<DeclContext>(*D)) {
if (InnerCtx->isTransparentContext() || InnerCtx->isInlineNamespace())