summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2014-03-29 15:09:45 +0000
committerTim Northover <tnorthover@apple.com>2014-03-29 15:09:45 +0000
commita2ee433c8d99632419d4a13a66cc4d06eada4014 (patch)
treee6ab2db8facbc4c5ed2fb11df260db8138572ace /clang/test/SemaObjC
parentaf3698066a1ea2e5ab4cc08ae9a59620cf18adb7 (diff)
downloadbcm5719-llvm-a2ee433c8d99632419d4a13a66cc4d06eada4014.tar.gz
bcm5719-llvm-a2ee433c8d99632419d4a13a66cc4d06eada4014.zip
ARM64: initial clang support commit.
This adds Clang support for the ARM64 backend. There are definitely still some rough edges, so please bring up any issues you see with this patch. As with the LLVM commit though, we think it'll be more useful for merging with AArch64 from within the tree. llvm-svn: 205100
Diffstat (limited to 'clang/test/SemaObjC')
-rw-r--r--clang/test/SemaObjC/opaque-is-access-warn.m24
-rw-r--r--clang/test/SemaObjC/opaque-is-access.m23
2 files changed, 47 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/opaque-is-access-warn.m b/clang/test/SemaObjC/opaque-is-access-warn.m
new file mode 100644
index 00000000000..ac0f724df6f
--- /dev/null
+++ b/clang/test/SemaObjC/opaque-is-access-warn.m
@@ -0,0 +1,24 @@
+// RUN: %clang -target x86_64-apple-darwin -arch arm64 -mios-version-min=7 -fsyntax-only -Wdeprecated-objc-isa-usage %s -Xclang -verify
+// RUN: %clang -target x86_64-apple-darwin -arch arm64 -mios-version-min=7 -fsyntax-only %s -Xclang -verify
+// RUN: %clang -target x86_64-apple-darwin -mios-simulator-version-min=7 -fsyntax-only -Wdeprecated-objc-isa-usage %s -Xclang -verify
+// rdar://10709102
+
+typedef struct objc_object {
+ struct objc_class *isa;
+} *id;
+
+@interface NSObject {
+ struct objc_class *isa;
+}
+@end
+@interface Whatever : NSObject
++self;
+@end
+
+static void func() {
+
+ id x;
+
+ [(*x).isa self]; // expected-error {{direct access to Objective-C's isa is deprecated in favor of object_getClass()}}
+ [x->isa self]; // expected-error {{direct access to Objective-C's isa is deprecated in favor of object_getClass()}}
+}
diff --git a/clang/test/SemaObjC/opaque-is-access.m b/clang/test/SemaObjC/opaque-is-access.m
new file mode 100644
index 00000000000..89d91b35606
--- /dev/null
+++ b/clang/test/SemaObjC/opaque-is-access.m
@@ -0,0 +1,23 @@
+// RUN: %clang -target x86_64-apple-darwin -arch arm64 -mios-version-min=7 -fsyntax-only %s -Xclang -verify
+// RUN: %clang -target x86_64-apple-darwin -arch x86_64 -mios-simulator-version-min=7 -fsyntax-only %s -Xclang -verify
+// rdar://10709102
+
+typedef struct objc_object {
+ struct objc_class *isa;
+} *id;
+
+@interface NSObject {
+ struct objc_class *isa;
+}
+@end
+@interface Whatever : NSObject
++self;
+@end
+
+static void func() {
+
+ id x;
+
+ [(*x).isa self]; // expected-error {{direct access to Objective-C's isa is deprecated in favor of object_getClass()}}
+ [x->isa self]; // expected-error {{direct access to Objective-C's isa is deprecated in favor of object_getClass()}}
+}
OpenPOWER on IntegriCloud