aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Lexer/cxx-features.cpp
diff options
context:
space:
mode:
authorCorentin Jabot <corentinjabot@gmail.com>2021-10-05 23:33:31 +0200
committerCorentin Jabot <corentinjabot@gmail.com>2022-03-22 19:51:19 +0100
commit683e83c56f98df6fe42d506a04dda44309ca758f (patch)
tree425747d6753617f8a8f10b6df4de06805135143b /clang/test/Lexer/cxx-features.cpp
parentbafbae238aa1948aa511c734a613a95d89a72546 (diff)
downloadllvm-683e83c56f98df6fe42d506a04dda44309ca758f.zip
llvm-683e83c56f98df6fe42d506a04dda44309ca758f.tar.gz
llvm-683e83c56f98df6fe42d506a04dda44309ca758f.tar.bz2
[Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr
Allow goto, labelled statements as well as `static`, `thread_local`, and non-literal variables in `constexpr` functions. As specified. for all of the above (except labelled statements) constant evaluation of the construct still fails. For `constexpr` bodies, the proposal is implemented with diagnostics as a language extension in older language modes. For determination of whether a lambda body satisfies the requirements for a constexpr function, the proposal is implemented only in C++2b mode to retain the semantics of older modes for programs conforming to them. Reviewed By: aaron.ballman, hubert.reinterpretcast, erichkeane Differential Revision: https://reviews.llvm.org/D111400
Diffstat (limited to 'clang/test/Lexer/cxx-features.cpp')
-rw-r--r--clang/test/Lexer/cxx-features.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/Lexer/cxx-features.cpp b/clang/test/Lexer/cxx-features.cpp
index 2847273..6b6729d 100644
--- a/clang/test/Lexer/cxx-features.cpp
+++ b/clang/test/Lexer/cxx-features.cpp
@@ -277,7 +277,7 @@
#error "wrong value for __cpp_lambdas"
#endif
-#if check(constexpr, 0, 200704, 201304, 201603, 201907, 201907)
+#if check(constexpr, 0, 200704, 201304, 201603, 201907, 202110)
#error "wrong value for __cpp_constexpr"
#endif