[cfe-commits] r126721 - /cfe/trunk/lib/Parse/ParseExprCXX.cpp
Douglas Gregor
dgregor at apple.com
Mon Feb 28 16:34:57 PST 2011
Author: dgregor
Date: Mon Feb 28 18:34:57 2011
New Revision: 126721
URL: http://llvm.org/viewvc/llvm-project?rev=126721&view=rev
Log:
Fix some regressions in the GCC testsuite due to bad souce-location
information. Fixes <rdar://problem/9063643>.
Modified:
cfe/trunk/lib/Parse/ParseExprCXX.cpp
Modified: cfe/trunk/lib/Parse/ParseExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseExprCXX.cpp?rev=126721&r1=126720&r2=126721&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseExprCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseExprCXX.cpp Mon Feb 28 18:34:57 2011
@@ -221,8 +221,12 @@
TemplateArgsPtr,
TemplateId->RAngleLoc,
CCLoc,
- EnteringContext))
- SS.SetInvalid(SourceRange(SS.getBeginLoc(), CCLoc));
+ EnteringContext)) {
+ SourceLocation StartLoc
+ = SS.getBeginLoc().isValid()? SS.getBeginLoc()
+ : TemplateId->TemplateNameLoc;
+ SS.SetInvalid(SourceRange(StartLoc, CCLoc));
+ }
TemplateId->Destroy();
continue;
More information about the cfe-commits
mailing list