From: Douglas Gregor Date: Fri, 25 Feb 2011 16:51:05 +0000 (+0000) Subject: Make sure to give CXXScopeSpec::SetInvalid() a valid source X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b17cb9e90d1d98c2cbcc3c0125eee9897b554921;p=clang Make sure to give CXXScopeSpec::SetInvalid() a valid source range. Fixes four new failures in the GCC testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126495 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Parse/ParseExprCXX.cpp b/lib/Parse/ParseExprCXX.cpp index 2abec6f0cc..d8db711809 100644 --- a/lib/Parse/ParseExprCXX.cpp +++ b/lib/Parse/ParseExprCXX.cpp @@ -217,7 +217,9 @@ bool Parser::ParseOptionalCXXScopeSpecifier(CXXScopeSpec &SS, continue; } else { - SS.SetInvalid(SourceRange(SS.getBeginLoc(), CCLoc)); + SourceLocation Start = SS.getBeginLoc().isValid()? SS.getBeginLoc() + : CCLoc; + SS.SetInvalid(SourceRange(Start, CCLoc)); } continue;