summaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/sel-address.mm
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenCXX/sel-address.mm')
-rw-r--r--clang/test/CodeGenCXX/sel-address.mm14
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/sel-address.mm b/clang/test/CodeGenCXX/sel-address.mm
new file mode 100644
index 0000000..c3db9a7
--- /dev/null
+++ b/clang/test/CodeGenCXX/sel-address.mm
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 %s -verify -emit-llvm -o %t
+// pr7390
+
+void f(const SEL& v2) {}
+void g() {
+ f(@selector(dealloc));
+
+ SEL s = @selector(dealloc);
+ SEL* ps = &s;
+
+ @selector(dealloc) = s; // expected-error {{expression is not assignable}}
+
+ SEL* ps2 = &@selector(dealloc);
+}