Can we warn about this?
On Thu, Nov 15, 2012 at 5:14 PM, Matt Beaumont-Gay <[email protected]> wrote: > Author: matthewbg > Date: Thu Nov 15 19:14:52 2012 > New Revision: 168124 > > URL: http://llvm.org/viewvc/llvm-project?rev=168124&view=rev > Log: > Fix PR14321, a crash when Clang is built with GCC 4.7 at -O1 or greater. > > GCC 4.7 reuses stack slots fairly aggressively, which exposes more temporary > lifetime bugs. > > No new test, this was caught by the existing > CodeGenCXX/mangle-ms-templates.cpp. > > Modified: > cfe/trunk/lib/AST/MicrosoftMangle.cpp > > Modified: cfe/trunk/lib/AST/MicrosoftMangle.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/MicrosoftMangle.cpp?rev=168124&r1=168123&r2=168124&view=diff > ============================================================================== > --- cfe/trunk/lib/AST/MicrosoftMangle.cpp (original) > +++ cfe/trunk/lib/AST/MicrosoftMangle.cpp Thu Nov 15 19:14:52 2012 > @@ -373,7 +373,7 @@ > dyn_cast<ClassTemplateSpecializationDecl>(ND)) { > TypeSourceInfo *TSI = Spec->getTypeAsWritten(); > if (TSI) { > - TemplateSpecializationTypeLoc &TSTL = > + TemplateSpecializationTypeLoc TSTL = > cast<TemplateSpecializationTypeLoc>(TSI->getTypeLoc()); > TemplateArgumentListInfo LI(TSTL.getLAngleLoc(), TSTL.getRAngleLoc()); > for (unsigned i = 0, e = TSTL.getNumArgs(); i != e; ++i) > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
