aboutsummaryrefslogtreecommitdiff
path: root/test/CXX/expr/expr.post/expr.static.cast/p7.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CXX/expr/expr.post/expr.static.cast/p7.cpp')
-rw-r--r--test/CXX/expr/expr.post/expr.static.cast/p7.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CXX/expr/expr.post/expr.static.cast/p7.cpp b/test/CXX/expr/expr.post/expr.static.cast/p7.cpp
new file mode 100644
index 000000000000..fd8e478b5193
--- /dev/null
+++ b/test/CXX/expr/expr.post/expr.static.cast/p7.cpp
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -std=c++1z -verify %s -fcxx-exceptions
+
+void (*p)() noexcept;
+void (*q)();
+
+void f() {
+ // FIXME: This seems like a bad rule.
+ p = static_cast<decltype(p)>(q); // expected-error {{not allowed}}
+ q = static_cast<decltype(q)>(p);
+}