[llvm-commits] [llvm-gcc-4.2] r105941 - /llvm-gcc-4.2/trunk/gcc/testsuite/g++.apple/block-bad-ivar-access.C
Stuart Hastings
stuart at apple.com
Mon Jun 14 11:27:41 PDT 2010
Author: stuart
Date: Mon Jun 14 13:27:41 2010
New Revision: 105941
URL: http://llvm.org/viewvc/llvm-project?rev=105941&view=rev
Log:
Commit a mislaid test case for Radar 7901648.
Added:
llvm-gcc-4.2/trunk/gcc/testsuite/g++.apple/block-bad-ivar-access.C
Added: llvm-gcc-4.2/trunk/gcc/testsuite/g++.apple/block-bad-ivar-access.C
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/testsuite/g%2B%2B.apple/block-bad-ivar-access.C?rev=105941&view=auto
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/testsuite/g++.apple/block-bad-ivar-access.C (added)
+++ llvm-gcc-4.2/trunk/gcc/testsuite/g++.apple/block-bad-ivar-access.C Mon Jun 14 13:27:41 2010
@@ -0,0 +1,25 @@
+/* APPLE LOCAL file 7901648 */
+/* { dg-do compile } */
+/* { dg-options "-mmacosx-version-min=10.5 -ObjC++ -fblocks" } */
+
+
+ at interface Foo {
+ int x;
+ int y;
+}
+ at end
+
+void fee(int);
+
+ at implementation Foo
++ (int)method {
+ ^{ x = 1; /* { dg-error "instance variable \\'x\\' accessed in class method" } */
+ /* { dg-error "was not declared" "" { target *-*-* } 16 } */
+ x =
+ y+1; /* { dg-error "instance variable \\'y\\' accessed in class method" } */
+ /* { dg-error "was not declared" "" { target *-*-* } 19 } */
+ fee(x);
+ return x; };
+}
+ at end
+
More information about the llvm-commits
mailing list