diff options
| author | John McCall <rjmccall@apple.com> | 2010-08-24 23:41:43 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2010-08-24 23:41:43 +0000 |
| commit | 3669c80de93aab2d9344a10bf3cfe7ae6fbdb04d (patch) | |
| tree | 950c41e3bd5923f24abb7554b99d1abaf3b8b1e2 /clang/lib/Parse/ParseExpr.cpp | |
| parent | 45140a90409616550ac6f013594372bbd8267330 (diff) | |
| download | bcm5719-llvm-3669c80de93aab2d9344a10bf3cfe7ae6fbdb04d.tar.gz bcm5719-llvm-3669c80de93aab2d9344a10bf3cfe7ae6fbdb04d.zip | |
Preserve invalidity of typeof operands in C++.
llvm-svn: 111999
Diffstat (limited to 'clang/lib/Parse/ParseExpr.cpp')
| -rw-r--r-- | clang/lib/Parse/ParseExpr.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp index c42fdecd7ee..7020fa412e3 100644 --- a/clang/lib/Parse/ParseExpr.cpp +++ b/clang/lib/Parse/ParseExpr.cpp @@ -1166,7 +1166,8 @@ Parser::ParseExprAfterTypeofSizeofAlignof(const Token &OpTok, // sizeof/alignof or in C++. Therefore, the parenthesized expression is // the start of a unary-expression, but doesn't include any postfix // pieces. Parse these now if present. - Operand = ParsePostfixExpressionSuffix(Operand.take()); + if (!Operand.isInvalid()) + Operand = ParsePostfixExpressionSuffix(Operand.get()); } } |

