diff options
author | Chris Lattner <sabre@nondot.org> | 2008-07-25 19:54:55 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-07-25 19:54:55 +0000 |
commit | 3872b5cadd63649c12dd41bca786b67327618462 (patch) | |
tree | 69715ff49d362ee89b1384cd3d1e03b352354bfd | |
parent | 7c778f1c549a8ae95d50a819fd537df78da16426 (diff) |
gcc requires a semicolon at the end of an interface, unlike its extension for structs.
rdar://6095245.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54044 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Parse/ParseObjc.cpp | 3 | ||||
-rw-r--r-- | test/Sema/objc-interface-1.m | 9 |
2 files changed, 9 insertions, 3 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp index 7d7ba10a38..d495e6f062 100644 --- a/lib/Parse/ParseObjc.cpp +++ b/lib/Parse/ParseObjc.cpp @@ -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 diff --git a/test/Sema/objc-interface-1.m b/test/Sema/objc-interface-1.m index 0e02542251..0130a33f9b 100644 --- a/test/Sema/objc-interface-1.m +++ b/test/Sema/objc-interface-1.m @@ -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 + + |