1 // RUN: %clang_cc1 -fsyntax-only -verify -Wno-unused-value %s
2 // RUN: %clang_cc1 -x objective-c++ -fsyntax-only -verify -Wcast-of-sel-type -Wno-unused-value %s
6 SEL sel_registerName(const char *);
9 (char *)s; // expected-warning {{cast of type 'SEL' to 'char *' is deprecated; use sel_getName instead}}
11 (const char *)sel_registerName("foo"); // expected-warning {{cast of type 'SEL' to 'const char *' is deprecated; use sel_getName instead}}
13 (const void *)sel_registerName("foo"); // ok
19 (const void *const)s; // ok
21 (SEL)sel_registerName("foo"); // ok