summaryrefslogtreecommitdiffstats
path: root/test/SemaObjC/comptypes-4.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjC/comptypes-4.m')
-rw-r--r--test/SemaObjC/comptypes-4.m25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/SemaObjC/comptypes-4.m b/test/SemaObjC/comptypes-4.m
new file mode 100644
index 0000000..5989011
--- /dev/null
+++ b/test/SemaObjC/comptypes-4.m
@@ -0,0 +1,25 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+
+extern void foo();
+
+@protocol MyProtocol @end
+
+@interface MyClass @end
+
+int main()
+{
+ MyClass <MyProtocol> *obj_p;
+ MyClass *obj_cp;
+
+ obj_cp = obj_p;
+ obj_p = obj_cp;
+
+ if (obj_cp == obj_p)
+ foo();
+
+ if (obj_p == obj_cp)
+ foo();
+
+}
+
+
OpenPOWER on IntegriCloud