[cfe-commits] r60115 - in /cfe/trunk: lib/Sema/SemaDeclObjC.cpp test/SemaObjC/continuation-class-err.m
Fariborz Jahanian
fjahanian at apple.com
Wed Nov 26 12:33:54 PST 2008
Author: fjahanian
Date: Wed Nov 26 14:33:54 2008
New Revision: 60115
URL: http://llvm.org/viewvc/llvm-project?rev=60115&view=rev
Log:
Removed a FIXME. Added a test case for anonymous category.
Added:
cfe/trunk/test/SemaObjC/continuation-class-err.m
Modified:
cfe/trunk/lib/Sema/SemaDeclObjC.cpp
Modified: cfe/trunk/lib/Sema/SemaDeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclObjC.cpp?rev=60115&r1=60114&r2=60115&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclObjC.cpp Wed Nov 26 14:33:54 2008
@@ -1251,10 +1251,10 @@
*isOverridingProperty = true;
return 0;
}
- // else
- // FIXME:
- // no matching property found in the main class. Must simply
- // add this property to the main class's property list.
+ // No matching property found in the main class. Just fall thru
+ // and add property to the anonymous category. It looks like
+ // it works as is. This category becomes just like a category
+ // for its primary class.
} else {
Diag(CDecl->getLocation(), diag::err_continuation_class);
*isOverridingProperty = true;
Added: cfe/trunk/test/SemaObjC/continuation-class-err.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/continuation-class-err.m?rev=60115&view=auto
==============================================================================
--- cfe/trunk/test/SemaObjC/continuation-class-err.m (added)
+++ cfe/trunk/test/SemaObjC/continuation-class-err.m Wed Nov 26 14:33:54 2008
@@ -0,0 +1,15 @@
+// RUN: clang -fsyntax-only -verify %s
+
+ at interface ReadOnly
+{
+ id _object;
+ id _object1;
+}
+ at property(readonly, assign) id object;
+ at property(readwrite, assign) id object1;
+ at end
+
+ at interface ReadOnly ()
+ at property(readwrite, copy) id object; // expected-warning {{property attribute in continuation class does not match the primary class}}
+ at property(readonly) id object1; // expected-error {{use contination class to override 'readonly' property with 'readwrite'}}
+ at end
More information about the cfe-commits
mailing list