summaryrefslogtreecommitdiffstats
path: root/test/CodeGenObjC/sel-as-builtin-type.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenObjC/sel-as-builtin-type.m')
-rw-r--r--test/CodeGenObjC/sel-as-builtin-type.m23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/CodeGenObjC/sel-as-builtin-type.m b/test/CodeGenObjC/sel-as-builtin-type.m
new file mode 100644
index 0000000..c65a5b2
--- /dev/null
+++ b/test/CodeGenObjC/sel-as-builtin-type.m
@@ -0,0 +1,23 @@
+// RUN: clang-cc -emit-llvm -o %t %s
+// pr5025
+// radar 7405040
+
+typedef const struct objc_selector {
+ void *sel_id;
+ const char *sel_types;
+} *SEL;
+
+@interface I2
++(id) dictionary;
+@end
+
+@implementation I3; // expected-warning {{cannot find interface declaration for 'I3'}}
++(void) initialize {
+ I2 *a0 = [I2 dictionary];
+}
+@end
+
+int func(SEL s1, SEL s2)
+{
+ return s1->sel_id == s2->sel_id;
+}
OpenPOWER on IntegriCloud