]> granicus.if.org Git - clang/commitdiff
gcc requires a semicolon at the end of an interface, unlike its extension for structs.
authorChris Lattner <sabre@nondot.org>
Fri, 25 Jul 2008 19:54:55 +0000 (19:54 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 25 Jul 2008 19:54:55 +0000 (19:54 +0000)
rdar://6095245.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54044 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Parse/ParseObjc.cpp
test/Sema/objc-interface-1.m

index 7d7ba10a38bff86ffbe1af0ccf13cc47138eac8b..d495e6f062bd676415acc5d78c60885a16a82d4d 100644 (file)
@@ -820,9 +820,6 @@ void Parser::ParseObjCClassInstanceVariables(DeclTy *interfaceDecl,
     
     if (Tok.is(tok::semi)) {
       ConsumeToken();
-    } else if (Tok.is(tok::r_brace)) {
-      Diag(Tok.getLocation(), diag::ext_expected_semi_decl_list);
-      break;
     } else {
       Diag(Tok, diag::err_expected_semi_decl_list);
       // Skip to end of block or statement
index 0e0254225199a53fb8c1ee56cdb9ec496d922aab..0130a33f9b9cdadb9768515601e2337cedd87516 100644 (file)
@@ -6,3 +6,12 @@ NSObject     // expected-error {{cannot find interface declaration for 'NSObject
 <NSCopying>  // expected-error {{cannot find protocol definition for 'NSCopying'}}
 @end
 
+
+// rdar://6095245
+@interface A
+{
+  int x
+}  // expected-error {{expected ';' at end of declaration list}}
+@end
+
+