[cfe-commits] r59875 - /cfe/trunk/test/SemaObjC/property-error-readonly-assign.m
Fariborz Jahanian
fjahanian at apple.com
Sat Nov 22 10:40:47 PST 2008
Author: fjahanian
Date: Sat Nov 22 12:40:47 2008
New Revision: 59875
URL: http://llvm.org/viewvc/llvm-project?rev=59875&view=rev
Log:
And a test case for my last patch.
Added:
cfe/trunk/test/SemaObjC/property-error-readonly-assign.m
Added: cfe/trunk/test/SemaObjC/property-error-readonly-assign.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/property-error-readonly-assign.m?rev=59875&view=auto
==============================================================================
--- cfe/trunk/test/SemaObjC/property-error-readonly-assign.m (added)
+++ cfe/trunk/test/SemaObjC/property-error-readonly-assign.m Sat Nov 22 12:40:47 2008
@@ -0,0 +1,13 @@
+// RUN: clang -fsyntax-only -verify %s
+
+ at interface A
+ -(int) x;
+ at property (readonly) int x;
+ at property int ok;
+ at end
+
+void f0(A *a) {
+ a.x = 10; // expected-error {{assigning to property with 'readonly' attribute not allowed}}
+ a.ok = 20;
+}
+
More information about the cfe-commits
mailing list