[cfe-commits] r159586 - in /cfe/trunk: lib/CodeGen/CodeGenModule.cpp test/CodeGenCXX/inline-functions.cpp
Douglas Gregor
dgregor at apple.com
Mon Jul 2 14:09:59 PDT 2012
On Jul 2, 2012, at 2:05 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> Author: efriedma
> Date: Mon Jul 2 16:05:30 2012
> New Revision: 159586
>
> URL: http://llvm.org/viewvc/llvm-project?rev=159586&view=rev
> Log:
> When we're looking for redeclarations which might provide a definition in CodeGen, make sure we examine all the redeclarations. PR13252.
>
>
> Modified:
> cfe/trunk/lib/CodeGen/CodeGenModule.cpp
> cfe/trunk/test/CodeGenCXX/inline-functions.cpp
>
> Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=159586&r1=159585&r2=159586&view=diff
> ==============================================================================
> --- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Mon Jul 2 16:05:30 2012
> @@ -1111,6 +1111,7 @@
> } else if (getLangOpts().CPlusPlus && D.getDecl()) {
> // Look for a declaration that's lexically in a record.
> const FunctionDecl *FD = cast<FunctionDecl>(D.getDecl());
> + FD = FD->getMostRecentDecl();
> do {
> if (isa<CXXRecordDecl>(FD->getLexicalDeclContext())) {
> if (FD->isImplicit() && !ForVTable) {
Alternatively, one could have switched to redecl_iterator.
- Doug
More information about the cfe-commits
mailing list