[cfe-commits] r101284 - in /cfe/trunk: lib/Parse/ParseObjc.cpp test/SemaObjC/pedantic-dynamic-test.m
Fariborz Jahanian
fjahanian at apple.com
Wed Apr 14 13:52:42 PDT 2010
Author: fjahanian
Date: Wed Apr 14 15:52:42 2010
New Revision: 101284
URL: http://llvm.org/viewvc/llvm-project?rev=101284&view=rev
Log:
Fix a -pedantic spurious warning involving @dynamic.
Added:
cfe/trunk/test/SemaObjC/pedantic-dynamic-test.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=101284&r1=101283&r2=101284&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseObjc.cpp (original)
+++ cfe/trunk/lib/Parse/ParseObjc.cpp Wed Apr 14 15:52:42 2010
@@ -1426,8 +1426,12 @@
break;
ConsumeToken(); // consume ','
}
- if (Tok.isNot(tok::semi))
+ if (Tok.isNot(tok::semi)) {
Diag(Tok, diag::err_expected_semi_after) << "@dynamic";
+ SkipUntil(tok::semi);
+ }
+ else
+ ConsumeToken(); // consume ';'
return DeclPtrTy();
}
Added: cfe/trunk/test/SemaObjC/pedantic-dynamic-test.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/pedantic-dynamic-test.m?rev=101284&view=auto
==============================================================================
--- cfe/trunk/test/SemaObjC/pedantic-dynamic-test.m (added)
+++ cfe/trunk/test/SemaObjC/pedantic-dynamic-test.m Wed Apr 14 15:52:42 2010
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s
+// rdar: // 7860960
+
+ at interface I
+{
+ int window;
+}
+ at property int window, noWarningNeeded;
+ at end
+
+ at implementation I
+
+ at synthesize window;
+
+ at dynamic noWarningNeeded;
+ at end
More information about the cfe-commits
mailing list