aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/cxx1z-constexpr-lambdas.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/cxx1z-constexpr-lambdas.cpp')
-rw-r--r--test/SemaCXX/cxx1z-constexpr-lambdas.cpp36
1 files changed, 0 insertions, 36 deletions
diff --git a/test/SemaCXX/cxx1z-constexpr-lambdas.cpp b/test/SemaCXX/cxx1z-constexpr-lambdas.cpp
deleted file mode 100644
index 8e7657fb6e8d..000000000000
--- a/test/SemaCXX/cxx1z-constexpr-lambdas.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-// RUN: %clang_cc1 -std=c++1z -verify -fsyntax-only -fblocks %s
-// RUN: %clang_cc1 -std=c++1z -verify -fsyntax-only -fblocks -fdelayed-template-parsing %s
-// RUN: %clang_cc1 -std=c++1z -verify -fsyntax-only -fblocks -fms-extensions %s
-// RUN: %clang_cc1 -std=c++1z -verify -fsyntax-only -fblocks -fdelayed-template-parsing -fms-extensions %s
-
-namespace test_constexpr_checking {
-
-namespace ns1 {
- struct NonLit { ~NonLit(); }; //expected-note{{not literal}}
- auto L = [](NonLit NL) constexpr { }; //expected-error{{not a literal type}}
-} // end ns1
-
-namespace ns2 {
- auto L = [](int I) constexpr { asm("non-constexpr"); }; //expected-error{{not allowed in constexpr function}}
-} // end ns1
-
-} // end ns test_constexpr_checking
-
-namespace test_constexpr_call {
-
-namespace ns1 {
- auto L = [](int I) { return I; };
- static_assert(L(3) == 3);
-} // end ns1
-namespace ns2 {
- auto L = [](auto a) { return a; };
- static_assert(L(3) == 3);
- static_assert(L(3.14) == 3.14);
-}
-namespace ns3 {
- auto L = [](auto a) { asm("non-constexpr"); return a; }; //expected-note{{declared here}}
- constexpr int I = //expected-error{{must be initialized by a constant expression}}
- L(3); //expected-note{{non-constexpr function}}
-}
-
-} // end ns test_constexpr_call \ No newline at end of file