From c9f439461b86a8d208ddb8b91a43b1c689a16b9c Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Mon, 2 Jul 2012 21:05:30 +0000 Subject: When we're looking for redeclarations which might provide a definition in CodeGen, make sure we examine all the redeclarations. PR13252. llvm-svn: 159586 --- clang/lib/CodeGen/CodeGenModule.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 25053b91a4c..ef20cf45562 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1111,6 +1111,7 @@ CodeGenModule::GetOrCreateLLVMFunction(StringRef MangledName, } else if (getLangOpts().CPlusPlus && D.getDecl()) { // Look for a declaration that's lexically in a record. const FunctionDecl *FD = cast(D.getDecl()); + FD = FD->getMostRecentDecl(); do { if (isa(FD->getLexicalDeclContext())) { if (FD->isImplicit() && !ForVTable) { -- cgit v1.2.3