[clang] 0a58d0c - [SystemZ] z/OS only accept C initialization (#194023)

via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 27 07:05:56 PDT 2026


Author: Sean Perry
Date: 2026-04-27T10:05:51-04:00
New Revision: 0a58d0ceb530a9caffd7126fe9c4bb98a79de1ac

URL: https://github.com/llvm/llvm-project/commit/0a58d0ceb530a9caffd7126fe9c4bb98a79de1ac
DIFF: https://github.com/llvm/llvm-project/commit/0a58d0ceb530a9caffd7126fe9c4bb98a79de1ac.diff

LOG: [SystemZ] z/OS only accept C initialization (#194023)

The TLS support only accept compile constant expressions (both C and
C++) on z/OS. Add #if to skip these tests on z/OS.

Added: 
    

Modified: 
    clang/test/AST/ByteCode/cxx17.cpp
    clang/test/SemaCXX/cxx17-compat.cpp

Removed: 
    


################################################################################
diff  --git a/clang/test/AST/ByteCode/cxx17.cpp b/clang/test/AST/ByteCode/cxx17.cpp
index 166638b0f5211..5d6e925eab32d 100644
--- a/clang/test/AST/ByteCode/cxx17.cpp
+++ b/clang/test/AST/ByteCode/cxx17.cpp
@@ -174,5 +174,7 @@ template <int I> struct std::tuple_element<I, const C> {
 
 namespace ZeroInCheckInvoke {
   constexpr C foo(const C &) { return C{}; }
+#ifndef __MVS__
   thread_local const auto &[s, t, u] = foo(C{}); // both-warning {{thread_local}}
+#endif
 }

diff  --git a/clang/test/SemaCXX/cxx17-compat.cpp b/clang/test/SemaCXX/cxx17-compat.cpp
index 1c9060d388d2a..fdf9b4a1cd55e 100644
--- a/clang/test/SemaCXX/cxx17-compat.cpp
+++ b/clang/test/SemaCXX/cxx17-compat.cpp
@@ -81,6 +81,7 @@ static auto [cx, cy, cz] = C();
     // expected-warning at -4 {{structured binding declaration declared 'static' is incompatible with C++ standards before C++20}}
 #endif
 void f() {
+#ifndef __MVS__
   static thread_local auto [cx, cy, cz] = C();
 #if __cplusplus <= 201703L
     // expected-warning at -2 {{structured binding declaration declared 'static' is a C++20 extension}}
@@ -89,6 +90,7 @@ void f() {
     // expected-warning at -5 {{structured binding declaration declared 'static' is incompatible with C++ standards before C++20}}
     // expected-warning at -6 {{structured binding declaration declared 'thread_local' is incompatible with C++ standards before C++20}}
 #endif
+#endif
 }
 
 struct DefaultedComparisons {


        


More information about the cfe-commits mailing list