PR12713 - crash on invalid due to unmatched parens in decltype

llvm-svn: 167547
This commit is contained in:
David Blaikie
2012-11-07 19:08:05 +00:00
parent 40f2d30987
commit 0da2fa3561
2 changed files with 9 additions and 2 deletions

View File

@@ -1940,8 +1940,8 @@ bool BalancedDelimiterTracker::diagnoseMissingClose() {
}
P.Diag(P.Tok, DID);
P.Diag(LOpen, diag::note_matching) << LHSName;
if (P.SkipUntil(Close))
LClose = P.Tok.getLocation();
if (P.SkipUntil(Close, /*StopAtSemi*/ true, /*DontConsume*/ true))
LClose = P.ConsumeAnyToken();
return true;
}