aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaCodeComplete.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-01-24 21:39:26 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-01-24 21:39:26 +0000
commitc15707d8da08df2eb22f6ed047743fa3f7c9831b (patch)
tree2a515e011fc4189d0909396ef7fbd70df37ca010 /lib/Sema/SemaCodeComplete.cpp
parent9d24c2cbd9cf1b7c165ccb13221f2efb2f4b49b0 (diff)
[libclang] In clang::getCursorKindForDecl() don't return "UnexposedDecl"
for forward references of classes and protocols, this breaks libclang API usage. rdar://10747438. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148861 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCodeComplete.cpp')
-rw-r--r--lib/Sema/SemaCodeComplete.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp
index 623e68b8a5..4fdbfdb836 100644
--- a/lib/Sema/SemaCodeComplete.cpp
+++ b/lib/Sema/SemaCodeComplete.cpp
@@ -2782,13 +2782,7 @@ CXCursorKind clang::getCursorKindForDecl(Decl *D) {
case Decl::ObjCCategoryImpl: return CXCursor_ObjCCategoryImplDecl;
case Decl::ObjCImplementation: return CXCursor_ObjCImplementationDecl;
- case Decl::ObjCInterface:
- if (cast<ObjCInterfaceDecl>(D)->isThisDeclarationADefinition())
- return CXCursor_ObjCInterfaceDecl;
-
- // Forward declarations are not directly exposed.
- return CXCursor_UnexposedDecl;
-
+ case Decl::ObjCInterface: return CXCursor_ObjCInterfaceDecl;
case Decl::ObjCIvar: return CXCursor_ObjCIvarDecl;
case Decl::ObjCMethod:
return cast<ObjCMethodDecl>(D)->isInstanceMethod()
@@ -2798,12 +2792,7 @@ CXCursorKind clang::getCursorKindForDecl(Decl *D) {
case Decl::CXXDestructor: return CXCursor_Destructor;
case Decl::CXXConversion: return CXCursor_ConversionFunction;
case Decl::ObjCProperty: return CXCursor_ObjCPropertyDecl;
- case Decl::ObjCProtocol:
- if (cast<ObjCProtocolDecl>(D)->isThisDeclarationADefinition())
- return CXCursor_ObjCProtocolDecl;
-
- return CXCursor_UnexposedDecl;
-
+ case Decl::ObjCProtocol: return CXCursor_ObjCProtocolDecl;
case Decl::ParmVar: return CXCursor_ParmDecl;
case Decl::Typedef: return CXCursor_TypedefDecl;
case Decl::TypeAlias: return CXCursor_TypeAliasDecl;