aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-11-06 21:48:47 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-11-06 21:48:47 +0000
commitd3fdcb5a1bf6bd5e54e18579c054ea3c292a0e28 (patch)
treecfbc8af077cfa7901d74170b849ad21c90512ccf
parent36df58ab9e3eb6823966ee16c5516eea1d88e541 (diff)
Fix a bogus objective-c warning with -pedantic.
(radar 7370882). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86291 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Parse/ParseObjc.cpp2
-rw-r--r--test/Parser/objc-init.m18
2 files changed, 20 insertions, 0 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp
index b998c2e9ea..71aeb30927 100644
--- a/lib/Parse/ParseObjc.cpp
+++ b/lib/Parse/ParseObjc.cpp
@@ -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();
}
diff --git a/test/Parser/objc-init.m b/test/Parser/objc-init.m
index a91ac9cf28..6d6b3827d7 100644
--- a/test/Parser/objc-init.m
+++ b/test/Parser/objc-init.m
@@ -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
+
+
+