aboutsummaryrefslogtreecommitdiff
path: root/clang/test/AST/ByteCode/cxx14.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/AST/ByteCode/cxx14.cpp')
-rw-r--r--clang/test/AST/ByteCode/cxx14.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/AST/ByteCode/cxx14.cpp b/clang/test/AST/ByteCode/cxx14.cpp
new file mode 100644
index 0000000..9622311
--- /dev/null
+++ b/clang/test/AST/ByteCode/cxx14.cpp
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -std=c++14 -verify=both,expected %s -fexperimental-new-constant-interpreter
+// RUN: %clang_cc1 -std=c++14 -verify=both,ref %s
+
+
+
+constexpr int(*null_ptr)() = nullptr;
+constexpr int test4 = (*null_ptr)(); // both-error {{must be initialized by a constant expression}} \
+ // both-note {{evaluates to a null function pointer}}
+