diff options
| author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-10-05 19:56:22 +0000 |
|---|---|---|
| committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-10-05 19:56:22 +0000 |
| commit | 2b1ef227f53fe3250d5d61e0d2161a622b31692b (patch) | |
| tree | 84d514dd954df29854439c7e049fb2f871bc926f /clang/lib/Parse/ParseExpr.cpp | |
| parent | 4ecd75348663657778a9e53067b5ba850b7187be (diff) | |
| download | bcm5719-llvm-2b1ef227f53fe3250d5d61e0d2161a622b31692b.tar.gz bcm5719-llvm-2b1ef227f53fe3250d5d61e0d2161a622b31692b.zip | |
Handle ambiguities between expressions and type-ids that occur inside parentheses, e.g.:
sizeof(int()) -> "int()" is type-id
sizeof(int()+1) -> "int()+1" is expression.
llvm-svn: 57131
Diffstat (limited to 'clang/lib/Parse/ParseExpr.cpp')
| -rw-r--r-- | clang/lib/Parse/ParseExpr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp index 64f31ddbc80..c8d95cf053c 100644 --- a/clang/lib/Parse/ParseExpr.cpp +++ b/clang/lib/Parse/ParseExpr.cpp @@ -981,7 +981,7 @@ Parser::ExprResult Parser::ParseParenExpression(ParenParseOption &ExprType, if (!Stmt.isInvalid && Tok.is(tok::r_paren)) Result = Actions.ActOnStmtExpr(OpenLoc, Stmt.Val, Tok.getLocation()); - } else if (ExprType >= CompoundLiteral && isTypeSpecifierQualifier()) { + } else if (ExprType >= CompoundLiteral && isTypeIdInParens()) { // Otherwise, this is a compound literal expression or cast expression. TypeTy *Ty = ParseTypeName(); |

