FirstPart = Actions.ActOnParamDeclarator(CurScope, ParmDecl);
} else
ConsumeToken(); // consume '...'
- SourceLocation RParenLoc = ConsumeParen();
+
+ SourceLocation RParenLoc;
+ if (Tok.is(tok::r_paren))
+ RParenLoc = ConsumeParen();
+ else // Skip over garbage, until we get to ')'. Eat the ')'.
+ SkipUntil(tok::r_paren, true, false);
+
OwningStmtResult CatchBody(Actions, true);
if (Tok.is(tok::l_brace))
CatchBody = ParseCompoundStatementBody();
--- /dev/null
+// RUN: clang-cc %s -verify -fsyntax-only
+
+// Note: NSException is not declared.
+void f0(id x) {
+ @try {
+ } @catch (NSException *x) { // expected-warning{{type specifier missing, defaults to 'int'}} expected-error{{@catch parameter is not an Objective-C class type}}
+ }
+}
+