llvm-project/clang/test/SemaObjCXX/debugger-cast-result-to-id.mm

10 lines
310 B
Plaintext
Raw Normal View History

// 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];
}
}