implement gcc/testsuite/objc.dg/method-attribute-3.m, by improving error recovery.

llvm-svn: 64609
This commit is contained in:
Chris Lattner 2009-02-15 22:24:30 +00:00
parent 0629c8f4e4
commit 8510b902fb
2 changed files with 10 additions and 1 deletions

View File

@ -239,7 +239,8 @@ void Parser::ParseObjCInterfaceDeclList(DeclTy *interfaceDecl,
allMethods.push_back(methodPrototype);
// Consume the ';' here, since ParseObjCMethodPrototype() is re-used for
// method definitions.
ExpectAndConsume(tok::semi, diag::err_expected_semi_after_method_proto);
ExpectAndConsume(tok::semi, diag::err_expected_semi_after_method_proto,
"", tok::semi);
continue;
}

View File

@ -0,0 +1,8 @@
// RUN: clang %s -fsyntax-only -verify
// Test features and error recovery for objc interfaces.
@interface INTF
- (int*) foo2 __attribute__((deprecated)) : (int) x1 __attribute__((deprecated)); // expected-error {{expected ';' after method prototype}}
@end