diff options
Diffstat (limited to 'clang/lib/Parse/ParseTentative.cpp')
-rw-r--r-- | clang/lib/Parse/ParseTentative.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Parse/ParseTentative.cpp b/clang/lib/Parse/ParseTentative.cpp index 95512a62693..1209b573d0e 100644 --- a/clang/lib/Parse/ParseTentative.cpp +++ b/clang/lib/Parse/ParseTentative.cpp @@ -259,11 +259,9 @@ bool Parser::isCXXConditionDeclaration() { // declarator TPR = TryParseDeclarator(false/*mayBeAbstract*/); - PA.Revert(); - // In case of an error, let the declaration parsing code handle it. if (TPR == TPR_error) - return true; + TPR = TPR_true; if (TPR == TPR_ambiguous) { // '=' @@ -275,6 +273,8 @@ bool Parser::isCXXConditionDeclaration() { TPR = TPR_false; } + PA.Revert(); + assert(TPR == TPR_true || TPR == TPR_false); return TPR == TPR_true; } |