From ec9fd13c775ae53ecde15da9bb725e66a7e52664 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Sat, 14 Jan 2012 16:38:05 +0000 Subject: De-virtualize getPreviousDecl() and getMostRecentDecl() when we know we have a redeclarable type, and only use the new virtual versions (getPreviousDeclImpl() and getMostRecentDeclImpl()) when we don't have that type information. This keeps us from penalizing users with strict type information (and is the moral equivalent of a "final" method). Plus, settle on the names getPreviousDecl() and getMostRecentDecl() throughout. llvm-svn: 148187 --- clang/tools/libclang/IndexingContext.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/tools/libclang/IndexingContext.cpp') diff --git a/clang/tools/libclang/IndexingContext.cpp b/clang/tools/libclang/IndexingContext.cpp index 299d1c93d8b..befdce90459 100644 --- a/clang/tools/libclang/IndexingContext.cpp +++ b/clang/tools/libclang/IndexingContext.cpp @@ -343,7 +343,7 @@ bool IndexingContext::handleObjCInterface(const ObjCInterfaceDecl *D) { return false; // already occurred. // FIXME: This seems like the wrong definition for redeclaration. - bool isRedeclaration = D->hasDefinition() || D->getPreviousDeclaration(); + bool isRedeclaration = D->hasDefinition() || D->getPreviousDecl(); ObjCContainerDeclInfo ContDInfo(/*isForwardRef=*/true, isRedeclaration, /*isImplementation=*/false); return handleObjCContainer(D, D->getLocation(), @@ -397,7 +397,7 @@ bool IndexingContext::handleObjCProtocol(const ObjCProtocolDecl *D) { return false; // already occurred. // FIXME: This seems like the wrong definition for redeclaration. - bool isRedeclaration = D->hasDefinition() || D->getPreviousDeclaration(); + bool isRedeclaration = D->hasDefinition() || D->getPreviousDecl(); ObjCContainerDeclInfo ContDInfo(/*isForwardRef=*/true, isRedeclaration, /*isImplementation=*/false); -- cgit v1.2.3