warn-cast-of-sel-expr.m [plain text]
// RUN: // RUN: // rdar://12107381
SEL s;
SEL sel_registerName(const char *);
int main() {
(char *)s; // expected-warning {{cast of type 'SEL' to 'char *' is deprecated; use sel_getName instead}}
(void *)s; // ok
(const char *)sel_registerName("foo"); // expected-warning {{cast of type 'SEL' to 'const char *' is deprecated; use sel_getName instead}}
(const void *)sel_registerName("foo"); // ok
(void) s; // ok
(void *const)s; // ok
(const void *const)s; // ok
}