diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-11-07 19:08:05 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-11-07 19:08:05 +0000 |
commit | b578aee665aad5ed1a46a26217c730fdfbfc8c2e (patch) | |
tree | ad04d7cb41accfd4ae6925b524d5104dc0a24654 /lib/Parse/Parser.cpp | |
parent | 3b45ca9e6292b45ab39d8c44d15a617017f26198 (diff) |
PR12713 - crash on invalid due to unmatched parens in decltype
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167547 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/Parser.cpp')
-rw-r--r-- | lib/Parse/Parser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp index 7bf4220199..f4cdd619ce 100644 --- a/lib/Parse/Parser.cpp +++ b/lib/Parse/Parser.cpp @@ -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; } |