]> granicus.if.org Git - clang/commitdiff
Fixed some testsuite problems introduced by my
authorSean Callanan <scallanan@apple.com>
Sat, 4 Feb 2012 02:28:18 +0000 (02:28 +0000)
committerSean Callanan <scallanan@apple.com>
Sat, 4 Feb 2012 02:28:18 +0000 (02:28 +0000)
last commit.  Sorry for the outage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149744 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaObjC/debugger-cast-result-to-id.m
test/SemaObjCXX/debugger-cast-result-to-id.mm [new file with mode: 0644]
test/SemaObjCXX/unknown-anytype.mm

index 86f4c3aa24d7d8e6fb9c2e65c25397ae93a68672..81a630703e7c39578cbdf3f16d0ca0a205f7b1d6 100644 (file)
@@ -7,21 +7,3 @@ void test_unknown_anytype_receiver() {
   (void)(int)[[test0 unknownMethod] otherUnknownMethod];;
   (void)(id)[[test1() unknownMethod] otherUnknownMethod];
 }
-// RUN: %clang_cc1 -funknown-anytype -fsyntax-only -fdebugger-support -fdebugger-cast-result-to-id -verify %s
-
-extern __unknown_anytype test0;
-extern __unknown_anytype test1();
-
-void test_unknown_anytype_receiver() {
-  (void)(int)[[test0 unknownMethod] otherUnknownMethod];;
-  (void)(id)[[test1() unknownMethod] otherUnknownMethod];
-}
-// RUN: %clang_cc1 -funknown-anytype -fsyntax-only -fdebugger-support -fdebugger-cast-result-to-id -verify %s
-
-extern __unknown_anytype test0;
-extern __unknown_anytype test1();
-
-void test_unknown_anytype_receiver() {
-  (void)(int)[[test0 unknownMethod] otherUnknownMethod];;
-  (void)(id)[[test1() unknownMethod] otherUnknownMethod];
-}
diff --git a/test/SemaObjCXX/debugger-cast-result-to-id.mm b/test/SemaObjCXX/debugger-cast-result-to-id.mm
new file mode 100644 (file)
index 0000000..9487a22
--- /dev/null
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -fdebugger-support -fdebugger-cast-result-to-id -funknown-anytype -fsyntax-only -verify %s
+
+// rdar://problem/9416370
+namespace test0 {
+  void test(id x) {
+    if ([x foo]) {} // expected-error {{no known method '-foo'; cast the message send to the method's return type}}
+    [x foo];
+  }
+}
index 40954c85ebe012afdd27da20200d356dc08e9045..b28b1355efcd40c98bcaf8a55b2fca94b33f5f4b 100644 (file)
@@ -4,6 +4,6 @@
 namespace test0 {
   void test(id x) {
     if ([x foo]) {} // expected-error {{no known method '-foo'; cast the message send to the method's return type}}
-    [x foo];
+    [x foo]; // expected-error {{no known method '-foo'; cast the message send to the method's return type}}
   }
 }