diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-10-05 15:19:49 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-10-05 15:19:49 +0000 |
commit | 2534620b4ec80cfccfe06fe63df9ea355b6d638c (patch) | |
tree | 90fb7671974cf3bdc6b1bd6734f8bd65703d24cb /clang/lib/Parse/ParseTentative.cpp | |
parent | 37e560cde1148aaa132904ec1a6105645238d677 (diff) | |
download | bcm5719-llvm-2534620b4ec80cfccfe06fe63df9ea355b6d638c.tar.gz bcm5719-llvm-2534620b4ec80cfccfe06fe63df9ea355b6d638c.zip |
Fix Parser::isCXXConditionDeclaration to properly resolve declarations.
llvm-svn: 57111
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; } |