forked from OSchip/llvm-project
implement gcc/testsuite/objc.dg/method-attribute-3.m, by improving error recovery.
llvm-svn: 64609
This commit is contained in:
parent
0629c8f4e4
commit
8510b902fb
|
@ -239,7 +239,8 @@ void Parser::ParseObjCInterfaceDeclList(DeclTy *interfaceDecl,
|
||||||
allMethods.push_back(methodPrototype);
|
allMethods.push_back(methodPrototype);
|
||||||
// Consume the ';' here, since ParseObjCMethodPrototype() is re-used for
|
// Consume the ';' here, since ParseObjCMethodPrototype() is re-used for
|
||||||
// method definitions.
|
// 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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue