diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-06-29 21:12:37 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-06-29 21:12:37 +0000 |
commit | 4556ebe62dd88d247ea04314f54ff46a25341525 (patch) | |
tree | 744617440b9d6ec8393eff0d563b483c51421ef3 | |
parent | 91b73f2542ebf58f885ad959c263dcd54251ea1d (diff) | |
download | bcm5719-llvm-4556ebe62dd88d247ea04314f54ff46a25341525.tar.gz bcm5719-llvm-4556ebe62dd88d247ea04314f54ff46a25341525.zip |
Convert another case over to RevertingTentativeParsingAction.
llvm-svn: 274167
-rw-r--r-- | clang/lib/Parse/ParseTentative.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/clang/lib/Parse/ParseTentative.cpp b/clang/lib/Parse/ParseTentative.cpp index 7415b8cd845..c79208a0019 100644 --- a/clang/lib/Parse/ParseTentative.cpp +++ b/clang/lib/Parse/ParseTentative.cpp @@ -1310,7 +1310,7 @@ Parser::isCXXDeclarationSpecifier(Parser::TPResult BracedCastResult, Tok.getAnnotationRange(), SS); if (SS.getScopeRep() && SS.getScopeRep()->isDependent()) { - TentativeParsingAction PA(*this); + RevertingTentativeParsingAction PA(*this); ConsumeToken(); ConsumeToken(); bool isIdentifier = Tok.is(tok::identifier); @@ -1318,7 +1318,6 @@ Parser::isCXXDeclarationSpecifier(Parser::TPResult BracedCastResult, if (!isIdentifier) TPR = isCXXDeclarationSpecifier(BracedCastResult, HasMissingTypename); - PA.Revert(); if (isIdentifier || TPR == TPResult::True || TPR == TPResult::Error) @@ -1330,8 +1329,6 @@ Parser::isCXXDeclarationSpecifier(Parser::TPResult BracedCastResult, *HasMissingTypename = true; return TPResult::Ambiguous; } - - // FIXME: Fails to either revert or commit the tentative parse! } else { // Try to resolve the name. If it doesn't exist, assume it was // intended to name a type and keep disambiguating. |