[cfe-commits] r64609 - in /cfe/trunk: lib/Parse/ParseObjc.cpp test/Parser/objc-interfaces.m

Chris Lattner sabre at nondot.org
Sun Feb 15 14:24:30 PST 2009


Author: lattner
Date: Sun Feb 15 16:24:30 2009
New Revision: 64609

URL: http://llvm.org/viewvc/llvm-project?rev=64609&view=rev
Log:
implement gcc/testsuite/objc.dg/method-attribute-3.m, by improving error recovery.

Added:
    cfe/trunk/test/Parser/objc-interfaces.m
Modified:
    cfe/trunk/lib/Parse/ParseObjc.cpp

Modified: cfe/trunk/lib/Parse/ParseObjc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseObjc.cpp?rev=64609&r1=64608&r2=64609&view=diff

==============================================================================
--- cfe/trunk/lib/Parse/ParseObjc.cpp (original)
+++ cfe/trunk/lib/Parse/ParseObjc.cpp Sun Feb 15 16:24:30 2009
@@ -239,7 +239,8 @@
       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;
     }
     

Added: cfe/trunk/test/Parser/objc-interfaces.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/objc-interfaces.m?rev=64609&view=auto

==============================================================================
--- cfe/trunk/test/Parser/objc-interfaces.m (added)
+++ cfe/trunk/test/Parser/objc-interfaces.m Sun Feb 15 16:24:30 2009
@@ -0,0 +1,8 @@
+// RUN: clang %s -fsyntax-only -verify
+
+// Test features and error recovery for objc interfaces.
+
+ at interface INTF
+- (int*) foo2  __attribute__((deprecated)) : (int) x1 __attribute__((deprecated)); // expected-error {{expected ';' after method prototype}}
+ at end
+





More information about the cfe-commits mailing list