2015-09-11 03:35:31 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
|
|
// pr7390
|
|
|
|
|
|
|
|
void f(const SEL& v2) {}
|
2015-09-16 07:17:17 +08:00
|
|
|
void g(SEL* _Nonnull);
|
|
|
|
void h() {
|
2015-09-11 03:35:31 +08:00
|
|
|
f(@selector(dealloc));
|
|
|
|
|
|
|
|
SEL s = @selector(dealloc);
|
|
|
|
SEL* ps = &s;
|
|
|
|
|
|
|
|
@selector(dealloc) = s; // expected-error {{expression is not assignable}}
|
|
|
|
|
|
|
|
SEL* ps2 = &@selector(dealloc);
|
2015-09-16 07:17:17 +08:00
|
|
|
|
|
|
|
// Shouldn't crash.
|
|
|
|
g(&@selector(foo));
|
2015-09-11 03:35:31 +08:00
|
|
|
}
|
2015-09-16 07:17:17 +08:00
|
|
|
|