SourceLocation AtLoc = ConsumeToken();
return Owned(ParseObjCAtExpression(AtLoc));
}
- case tok::l_square:
- // These can be followed by postfix-expr pieces.
- if (getLang().ObjC1)
- return ParsePostfixExpressionSuffix(Owned(ParseObjCMessageExpression()));
- // FALL THROUGH.
case tok::caret:
if (getLang().Blocks)
return ParsePostfixExpressionSuffix(Owned(ParseBlockLiteralExpression()));
Diag(Tok, diag::err_expected_expression);
return ExprError();
+ case tok::l_square:
+ // These can be followed by postfix-expr pieces.
+ if (getLang().ObjC1)
+ return ParsePostfixExpressionSuffix(Owned(ParseObjCMessageExpression()));
+ // FALL THROUGH.
default:
UnhandledToken:
Diag(Tok, diag::err_expected_expression);
-// RUN: clang -fsyntax-only -verify -pedantic %s
+// RUN: clang -fsyntax-only -verify -pedantic -fblocks %s
// PR2241
float test2241[] = {
struct S A = {
&BADIDENT, 0 /* expected-error {{use of undeclared identifier}} */
};
+
+// rdar://6248081
+int test6248081() {
+ [10] // expected-error {{expected expression}}
+}
+