diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-01-19 22:07:56 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-01-19 22:07:56 +0000 |
commit | accb183371d347130ae51d207336aceefbcae2dc (patch) | |
tree | 4cc1b717a70f0cdca26bc8fc5946ac10c0d5b5ee /clang/tools/CIndex/CXCursor.cpp | |
parent | dc50e5d128f98081e3fda1bb42a6e49150ba5ffc (diff) | |
download | bcm5719-llvm-accb183371d347130ae51d207336aceefbcae2dc.tar.gz bcm5719-llvm-accb183371d347130ae51d207336aceefbcae2dc.zip |
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
Diffstat (limited to 'clang/tools/CIndex/CXCursor.cpp')
-rw-r--r-- | clang/tools/CIndex/CXCursor.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/tools/CIndex/CXCursor.cpp b/clang/tools/CIndex/CXCursor.cpp index 00636f74d50..f284b248cdf 100644 --- a/clang/tools/CIndex/CXCursor.cpp +++ b/clang/tools/CIndex/CXCursor.cpp @@ -44,10 +44,10 @@ static CXCursorKind GetCursorKind(Decl *D) { 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 @@ static CXCursorKind GetCursorKind(Decl *D) { case TagDecl::TK_enum: return CXCursor_EnumDecl; } } + + return CXCursor_UnexposedDecl; } llvm_unreachable("Invalid Decl"); @@ -161,6 +163,7 @@ ASTContext &cxcursor::getCursorContext(CXCursor Cursor) { case CXCursor_ObjCClassMethodDecl: case CXCursor_ObjCImplementationDecl: case CXCursor_ObjCCategoryImplDecl: + case CXCursor_UnexposedDecl: return static_cast<Decl *>(Cursor.data[0])->getASTContext(); case CXCursor_ObjCSuperClassRef: |