diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-12-15 20:29:51 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-12-15 20:29:51 +0000 |
commit | dc9166c8e1120dc0df1859ba6e3d457a458fd20f (patch) | |
tree | eb14bbba9db83cabdb68f9855daa4109c4c1940a /clang/lib/Sema/SemaCodeComplete.cpp | |
parent | 918f976e66e8311ab1053b83521511ddee039783 (diff) | |
download | bcm5719-llvm-dc9166c8e1120dc0df1859ba6e3d457a458fd20f.tar.gz bcm5719-llvm-dc9166c8e1120dc0df1859ba6e3d457a458fd20f.zip |
Keep track of all declarations of an Objective-C class (both forward
declarations and definitions) as ObjCInterfaceDecls within the same
redeclaration chain. This new representation matches what we do for
C/C++ variables/functions/classes/templates/etc., and makes it
possible to answer the query "where are all of the declarations of
this class?"
llvm-svn: 146679
Diffstat (limited to 'clang/lib/Sema/SemaCodeComplete.cpp')
-rw-r--r-- | clang/lib/Sema/SemaCodeComplete.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp index 7e7e87a0650..79985e8b322 100644 --- a/clang/lib/Sema/SemaCodeComplete.cpp +++ b/clang/lib/Sema/SemaCodeComplete.cpp @@ -5487,14 +5487,14 @@ static void AddInterfaceResults(DeclContext *Ctx, DeclContext *CurContext, D != DEnd; ++D) { // Record any interfaces we find. if (ObjCInterfaceDecl *Class = dyn_cast<ObjCInterfaceDecl>(*D)) - if ((!OnlyForwardDeclarations || Class->isForwardDecl()) && + if ((!OnlyForwardDeclarations || !Class->hasDefinition()) && (!OnlyUnimplemented || !Class->getImplementation())) Results.AddResult(Result(Class, 0), CurContext, 0, false); // Record any forward-declared interfaces we find. if (ObjCClassDecl *Forward = dyn_cast<ObjCClassDecl>(*D)) { ObjCInterfaceDecl *IDecl = Forward->getForwardInterfaceDecl(); - if ((!OnlyForwardDeclarations || IDecl->isForwardDecl()) && + if ((!OnlyForwardDeclarations || !IDecl->hasDefinition()) && (!OnlyUnimplemented || !IDecl->getImplementation())) Results.AddResult(Result(IDecl, 0), CurContext, 0, false); |