summaryrefslogtreecommitdiff
path: root/clang/test/AST/ByteCode/cxx23.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/AST/ByteCode/cxx23.cpp')
-rw-r--r--clang/test/AST/ByteCode/cxx23.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/AST/ByteCode/cxx23.cpp b/clang/test/AST/ByteCode/cxx23.cpp
index 2182d7c4e432..72c751d627a4 100644
--- a/clang/test/AST/ByteCode/cxx23.cpp
+++ b/clang/test/AST/ByteCode/cxx23.cpp
@@ -83,6 +83,11 @@ constexpr int k(int n) {
}
constexpr int k0 = k(0);
+namespace ThreadLocalStore {
+ thread_local int &&a = 0;
+ void store() { a = 42; }
+}
+
#if __cplusplus >= 202302L
constexpr int &b = b; // all-error {{must be initialized by a constant expression}} \
// all-note {{initializer of 'b' is not a constant expression}} \