[clang] 56bac6c - Revert "[clang] [test] Narrow down MSVC specific behaviours from "any windows" to only MSVC/clang-cl"

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Wed May 10 07:49:43 PDT 2023


Author: Nico Weber
Date: 2023-05-10T16:49:18+02:00
New Revision: 56bac6c87a2d9046dbac36aae4910b4b90edf643

URL: https://github.com/llvm/llvm-project/commit/56bac6c87a2d9046dbac36aae4910b4b90edf643
DIFF: https://github.com/llvm/llvm-project/commit/56bac6c87a2d9046dbac36aae4910b4b90edf643.diff

LOG: Revert "[clang] [test] Narrow down MSVC specific behaviours from "any windows" to only MSVC/clang-cl"

This reverts commit 7f037e5645bd62fca6fc7c3e77962aafe2bc8b27.
Breaks tests, see https://reviews.llvm.org/D149997#4331937

Added: 
    

Modified: 
    clang/test/C/drs/dr1xx.c
    clang/test/Driver/experimental-library-flag.cpp
    clang/test/SemaCXX/attr-trivial-abi.cpp

Removed: 
    


################################################################################
diff  --git a/clang/test/C/drs/dr1xx.c b/clang/test/C/drs/dr1xx.c
index 6bbeb02408c7a..400807ed5da84 100644
--- a/clang/test/C/drs/dr1xx.c
+++ b/clang/test/C/drs/dr1xx.c
@@ -235,7 +235,7 @@ void dr118(void) {
 	 * type at this point.
 	 */
     Val = sizeof(enum E)
-    #ifndef _MSC_VER
+    #ifndef _WIN32
     /* expected-error at -2 {{invalid application of 'sizeof' to an incomplete type 'enum E'}} */
     /* expected-note at -12 {{definition of 'enum E' is not complete until the closing '}'}} */
     #endif

diff  --git a/clang/test/Driver/experimental-library-flag.cpp b/clang/test/Driver/experimental-library-flag.cpp
index db6a90b50f255..148cb7ed2adb0 100644
--- a/clang/test/Driver/experimental-library-flag.cpp
+++ b/clang/test/Driver/experimental-library-flag.cpp
@@ -1,6 +1,6 @@
 // On some platforms, -stdlib=libc++ is currently ignored, so -lc++experimental is not added.
 // Once -stdlib=libc++ works on those, this XFAIL can be removed.
-// XFAIL: target={{.*-windows-msvc.*}}, target={{.*-(ps4|ps5)}}
+// XFAIL: target={{.*-windows.*}}, target={{.*-(ps4|ps5)}}
 
 // For some reason, this fails with a core dump on AIX. This needs to be investigated.
 // UNSUPPORTED: target={{.*}}-aix{{.*}}

diff  --git a/clang/test/SemaCXX/attr-trivial-abi.cpp b/clang/test/SemaCXX/attr-trivial-abi.cpp
index 2cee3bd5dd215..deae99f7d0890 100644
--- a/clang/test/SemaCXX/attr-trivial-abi.cpp
+++ b/clang/test/SemaCXX/attr-trivial-abi.cpp
@@ -5,11 +5,11 @@ void __attribute__((trivial_abi)) foo(); // expected-warning {{'trivial_abi' att
 // Should not crash.
 template <class>
 class __attribute__((trivial_abi)) a { a(a &&); };
-#if defined(_WIN64) && defined(_MSC_VER)
-// On Windows/MSVC, to be trivial-for-calls, an object must be trivially copyable.
+#ifdef _WIN64
+// On Windows, to be trivial-for-calls, an object must be trivially copyable.
 // (And it is only trivially relocatable, currently, if it is trivial for calls.)
 // In this case, it is suppressed by an explicitly defined move constructor.
-// Similar concerns apply to later tests that have #if defined(_WIN64) && defined(_MSC_VER).
+// Similar concerns apply to later tests that have #ifdef _WIN64.
 static_assert(!__is_trivially_relocatable(a<int>), "");
 #else
 static_assert(__is_trivially_relocatable(a<int>), "");
@@ -137,7 +137,7 @@ struct __attribute__((trivial_abi)) CopyDeleted {
   CopyDeleted(const CopyDeleted &) = delete;
   CopyDeleted(CopyDeleted &&) = default;
 };
-#if defined(_WIN64) && defined(_MSC_VER)
+#ifdef _WIN64
 static_assert(!__is_trivially_relocatable(CopyDeleted), "");
 #else
 static_assert(__is_trivially_relocatable(CopyDeleted), "");
@@ -163,7 +163,7 @@ static_assert(!__is_trivially_relocatable(S19), "");
 struct __attribute__((trivial_abi)) S20 {
   int &&a; // a member of rvalue reference type deletes the copy constructor.
 };
-#if defined(_WIN64) && defined(_MSC_VER)
+#ifdef _WIN64
 static_assert(!__is_trivially_relocatable(S20), "");
 #else
 static_assert(__is_trivially_relocatable(S20), "");


        


More information about the cfe-commits mailing list