Skip to content

Commit 4556ebe

Browse files
committed
Convert another case over to RevertingTentativeParsingAction.
llvm-svn: 274167
1 parent 91b73f2 commit 4556ebe

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

clang/lib/Parse/ParseTentative.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,15 +1310,14 @@ Parser::isCXXDeclarationSpecifier(Parser::TPResult BracedCastResult,
13101310
Tok.getAnnotationRange(),
13111311
SS);
13121312
if (SS.getScopeRep() && SS.getScopeRep()->isDependent()) {
1313-
TentativeParsingAction PA(*this);
1313+
RevertingTentativeParsingAction PA(*this);
13141314
ConsumeToken();
13151315
ConsumeToken();
13161316
bool isIdentifier = Tok.is(tok::identifier);
13171317
TPResult TPR = TPResult::False;
13181318
if (!isIdentifier)
13191319
TPR = isCXXDeclarationSpecifier(BracedCastResult,
13201320
HasMissingTypename);
1321-
PA.Revert();
13221321

13231322
if (isIdentifier ||
13241323
TPR == TPResult::True || TPR == TPResult::Error)
@@ -1330,8 +1329,6 @@ Parser::isCXXDeclarationSpecifier(Parser::TPResult BracedCastResult,
13301329
*HasMissingTypename = true;
13311330
return TPResult::Ambiguous;
13321331
}
1333-
1334-
// FIXME: Fails to either revert or commit the tentative parse!
13351332
} else {
13361333
// Try to resolve the name. If it doesn't exist, assume it was
13371334
// intended to name a type and keep disambiguating.

0 commit comments

Comments
 (0)