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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57131 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp
index 64f31dd..c8d95cf 100644
--- a/lib/Parse/ParseExpr.cpp
+++ b/lib/Parse/ParseExpr.cpp
@@ -981,7 +981,7 @@
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();