Eliminate ObjCClassDecl, which is redundant now that ObjCInterfaceDecl
covers both declarations (@class) and definitions (@interface) of an Objective-C class. llvm-svn: 147299
This commit is contained in:
@@ -2781,14 +2781,20 @@ CXCursorKind clang::getCursorKindForDecl(Decl *D) {
|
||||
return CXCursor_FunctionDecl;
|
||||
case Decl::ObjCCategory: return CXCursor_ObjCCategoryDecl;
|
||||
case Decl::ObjCCategoryImpl: return CXCursor_ObjCCategoryImplDecl;
|
||||
case Decl::ObjCClass:
|
||||
// FIXME
|
||||
return CXCursor_UnexposedDecl;
|
||||
case Decl::ObjCForwardProtocol:
|
||||
// FIXME
|
||||
return CXCursor_UnexposedDecl;
|
||||
case Decl::ObjCImplementation: return CXCursor_ObjCImplementationDecl;
|
||||
case Decl::ObjCInterface: return CXCursor_ObjCInterfaceDecl;
|
||||
|
||||
case Decl::ObjCInterface:
|
||||
if (cast<ObjCInterfaceDecl>(D)->isThisDeclarationADefinition())
|
||||
return CXCursor_ObjCInterfaceDecl;
|
||||
|
||||
// Forward declarations are not directly exposed.
|
||||
return CXCursor_UnexposedDecl;
|
||||
|
||||
case Decl::ObjCIvar: return CXCursor_ObjCIvarDecl;
|
||||
case Decl::ObjCMethod:
|
||||
return cast<ObjCMethodDecl>(D)->isInstanceMethod()
|
||||
@@ -5490,15 +5496,6 @@ static void AddInterfaceResults(DeclContext *Ctx, DeclContext *CurContext,
|
||||
if ((!OnlyForwardDeclarations || !Class->hasDefinition()) &&
|
||||
(!OnlyUnimplemented || !Class->getImplementation()))
|
||||
Results.AddResult(Result(Class, 0), CurContext, 0, false);
|
||||
|
||||
// Record any forward-declared interfaces we find.
|
||||
if (ObjCClassDecl *Forward = dyn_cast<ObjCClassDecl>(*D)) {
|
||||
ObjCInterfaceDecl *IDecl = Forward->getForwardInterfaceDecl();
|
||||
if ((!OnlyForwardDeclarations || !IDecl->hasDefinition()) &&
|
||||
(!OnlyUnimplemented || !IDecl->getImplementation()))
|
||||
Results.AddResult(Result(IDecl, 0), CurContext,
|
||||
0, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user