Introduce the notion of an "unexposed" declaration into the CIndex
API. This is a catch-all for any declaration known to Clang but not
specifically part of the CIndex API. We'll use the same approach with
expressions, statements, references, etc., as needed.
llvm-svn: 93924
diff --git a/clang/tools/CIndex/CXCursor.cpp b/clang/tools/CIndex/CXCursor.cpp
index 00636f7..f284b24 100644
--- a/clang/tools/CIndex/CXCursor.cpp
+++ b/clang/tools/CIndex/CXCursor.cpp
@@ -44,10 +44,10 @@
case Decl::ObjCCategoryImpl: return CXCursor_ObjCCategoryImplDecl;
case Decl::ObjCClass:
// FIXME
- return CXCursor_NotImplemented;
+ return CXCursor_UnexposedDecl;
case Decl::ObjCForwardProtocol:
// FIXME
- return CXCursor_NotImplemented;
+ return CXCursor_UnexposedDecl;
case Decl::ObjCImplementation: return CXCursor_ObjCImplementationDecl;
case Decl::ObjCInterface: return CXCursor_ObjCInterfaceDecl;
case Decl::ObjCIvar: return CXCursor_ObjCIvarDecl;
@@ -68,6 +68,8 @@
case TagDecl::TK_enum: return CXCursor_EnumDecl;
}
}
+
+ return CXCursor_UnexposedDecl;
}
llvm_unreachable("Invalid Decl");
@@ -161,6 +163,7 @@
case CXCursor_ObjCClassMethodDecl:
case CXCursor_ObjCImplementationDecl:
case CXCursor_ObjCCategoryImplDecl:
+ case CXCursor_UnexposedDecl:
return static_cast<Decl *>(Cursor.data[0])->getASTContext();
case CXCursor_ObjCSuperClassRef: