From 1c594088415831e52db96ffd700cf79e274a8f91 Mon Sep 17 00:00:00 2001 From: Sean Callanan Date: Sat, 4 Feb 2012 02:28:18 +0000 Subject: [PATCH] Fixed some testsuite problems introduced by my 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 | 18 ------------------ test/SemaObjCXX/debugger-cast-result-to-id.mm | 9 +++++++++ test/SemaObjCXX/unknown-anytype.mm | 2 +- 3 files changed, 10 insertions(+), 19 deletions(-) create mode 100644 test/SemaObjCXX/debugger-cast-result-to-id.mm diff --git a/test/SemaObjC/debugger-cast-result-to-id.m b/test/SemaObjC/debugger-cast-result-to-id.m index 86f4c3aa24..81a630703e 100644 --- a/test/SemaObjC/debugger-cast-result-to-id.m +++ b/test/SemaObjC/debugger-cast-result-to-id.m @@ -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 index 0000000000..9487a22b6c --- /dev/null +++ b/test/SemaObjCXX/debugger-cast-result-to-id.mm @@ -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]; + } +} diff --git a/test/SemaObjCXX/unknown-anytype.mm b/test/SemaObjCXX/unknown-anytype.mm index 40954c85eb..b28b1355ef 100644 --- a/test/SemaObjCXX/unknown-anytype.mm +++ b/test/SemaObjCXX/unknown-anytype.mm @@ -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}} } } -- 2.50.1