summaryrefslogtreecommitdiffstats
path: root/test/SemaObjC/exprs.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjC/exprs.m')
-rw-r--r--test/SemaObjC/exprs.m21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/SemaObjC/exprs.m b/test/SemaObjC/exprs.m
new file mode 100644
index 0000000..d51d135
--- /dev/null
+++ b/test/SemaObjC/exprs.m
@@ -0,0 +1,21 @@
+// RUN: clang-cc %s -fsyntax-only -verify
+
+// rdar://6597252
+Class test1(Class X) {
+ return 1 ? X : X;
+}
+
+
+// rdar://6079877
+void test2() {
+ id str = @"foo"
+ "bar\0" // expected-warning {{literal contains NUL character}}
+ @"baz" " blarg";
+ id str2 = @"foo"
+ "bar"
+ @"baz"
+ " b\0larg"; // expected-warning {{literal contains NUL character}}
+
+
+ if (@encode(int) == "foo") { } // expected-warning {{result of comparison against @encode is unspecified}}
+}
OpenPOWER on IntegriCloud