[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
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp
index fe4e373..f49d6f6 100644
--- a/tools/libclang/CIndex.cpp
+++ b/tools/libclang/CIndex.cpp
@@ -3922,9 +3922,7 @@
if (ObjCProtocolDecl *Def = Prot->getDefinition())
return MakeCXCursor(Def, tu);
- CXCursor C = MakeCXCursor(Prot, tu);
- C.kind = CXCursor_ObjCProtocolDecl; // override "Unexposed".
- return C;
+ return MakeCXCursor(Prot, tu);
}
case CXCursor_ObjCClassRef: {
@@ -3932,9 +3930,7 @@
if (ObjCInterfaceDecl *Def = Class->getDefinition())
return MakeCXCursor(Def, tu);
- CXCursor C = MakeCXCursor(Class, tu);
- C.kind = CXCursor_ObjCInterfaceDecl; // override "Unexposed".
- return C;
+ return MakeCXCursor(Class, tu);
}
case CXCursor_TypeRef: