From: Chris Lattner Date: Sun, 15 Feb 2009 22:24:30 +0000 (+0000) Subject: implement gcc/testsuite/objc.dg/method-attribute-3.m, by improving error recovery. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b6d74a158a9c002e3c0fcbda8ad8d0ccbb2e5088;p=clang implement gcc/testsuite/objc.dg/method-attribute-3.m, by improving error recovery. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64609 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp index 210f33a5f7..4e4d009fe0 100644 --- a/lib/Parse/ParseObjc.cpp +++ b/lib/Parse/ParseObjc.cpp @@ -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; } diff --git a/test/Parser/objc-interfaces.m b/test/Parser/objc-interfaces.m new file mode 100644 index 0000000000..b13eea5955 --- /dev/null +++ b/test/Parser/objc-interfaces.m @@ -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 +