[cfe-commits] r168124 - /cfe/trunk/lib/AST/MicrosoftMangle.cpp
Matt Beaumont-Gay
matthewbg at google.com
Thu Nov 15 17:14:52 PST 2012
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)
More information about the cfe-commits
mailing list