Convert another case over to RevertingTentativeParsingAction.
llvm-svn: 274167
diff --git a/clang/lib/Parse/ParseTentative.cpp b/clang/lib/Parse/ParseTentative.cpp
index 7415b8c..c79208a 100644
--- a/clang/lib/Parse/ParseTentative.cpp
+++ b/clang/lib/Parse/ParseTentative.cpp
@@ -1310,7 +1310,7 @@
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 @@
if (!isIdentifier)
TPR = isCXXDeclarationSpecifier(BracedCastResult,
HasMissingTypename);
- PA.Revert();
if (isIdentifier ||
TPR == TPResult::True || TPR == TPResult::Error)
@@ -1330,8 +1329,6 @@
*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.