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?"
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146679 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/libclang/IndexDecl.cpp b/tools/libclang/IndexDecl.cpp
index 0d6dacb..96a21d8 100644
--- a/tools/libclang/IndexDecl.cpp
+++ b/tools/libclang/IndexDecl.cpp
@@ -97,7 +97,7 @@
bool VisitObjCInterfaceDecl(ObjCInterfaceDecl *D) {
// Forward decls are handled at VisitObjCClassDecl.
- if (D->isForwardDecl())
+ if (!D->isThisDeclarationADefinition())
return true;
IndexCtx.handleObjCInterface(D);