]> granicus.if.org Git - clang/commitdiff
Fix a bogus objective-c warning with -pedantic.
authorFariborz Jahanian <fjahanian@apple.com>
Fri, 6 Nov 2009 21:48:47 +0000 (21:48 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Fri, 6 Nov 2009 21:48:47 +0000 (21:48 +0000)
(radar 7370882).

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

lib/Parse/ParseObjc.cpp
test/Parser/objc-init.m

index b998c2e9eac6ff1777497c2c1e13666e9b429bbc..71aeb30927a3a932ff65cf8c313f3464bdd4030a 100644 (file)
@@ -1202,6 +1202,8 @@ Parser::DeclPtrTy Parser::ParseObjCPropertySynthesize(SourceLocation atLoc) {
   }
   if (Tok.isNot(tok::semi))
     Diag(Tok, diag::err_expected_semi_after) << "@synthesize";
+  else
+    ConsumeToken(); // consume ';'
   return DeclPtrTy();
 }
 
index a91ac9cf285be73917ea25299ae7919e840bacdf..6d6b3827d73c2930416fab3973a1ea5f4301c11b 100644 (file)
@@ -39,3 +39,21 @@ void test5(NSNumber *x) {
     .x [x METH2]    // expected-error {{expected '=' or another designator}}
   };
 }
+
+// rdar://7370882
+@interface SemicolonsAppDelegate 
+{
+  id i;
+}
+@property (assign) id window;
+@end
+
+@implementation SemicolonsAppDelegate
+{
+  id i;
+}
+  @synthesize window;
+@end
+
+
+