Fix some regressions in the GCC testsuite due to bad souce-location

information. Fixes <rdar://problem/9063643>.

llvm-svn: 126721
This commit is contained in:
Douglas Gregor 2011-03-01 00:34:57 +00:00
parent 683bbc16c4
commit ff42ec5895
1 changed files with 6 additions and 2 deletions

View File

@ -221,8 +221,12 @@ bool Parser::ParseOptionalCXXScopeSpecifier(CXXScopeSpec &SS,
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;