// RUN: %clang_cc1 -fsyntax-only -verify -Wno-unused-value %s
// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -verify -Wcast-of-sel-type -Wno-unused-value %s
// rdar://12107381
SEL s;SELsel_registerName(constchar*);intmain(void){(char*)s;// expected-warning {{cast of type 'SEL' to 'char *' is deprecated; use sel_getName instead}}
(void*)s;// ok
(constchar*)sel_registerName("foo");// expected-warning {{cast of type 'SEL' to 'const char *' is deprecated; use sel_getName instead}}
(constvoid*)sel_registerName("foo");// ok
(void) s;// ok
(void*const)s;// ok
(constvoid*const)s;// ok
// rdar://12859590
(SEL)sel_registerName("foo");// ok
}