Skip to content

Commit

Permalink
Revert "[clang] [test] Narrow down MSVC specific behaviours from "any…
Browse files Browse the repository at this point in the history
… windows" to only MSVC/clang-cl"

This reverts commit 7f037e5.
Breaks tests, see https://reviews.llvm.org/D149997#4331937
  • Loading branch information
nico committed May 10, 2023
1 parent ddfb974 commit 56bac6c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion clang/test/C/drs/dr1xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ void dr118(void) {
* type at this point.
*/
Val = sizeof(enum E)
#ifndef _MSC_VER
#ifndef _WIN32
/* expected-error@-2 {{invalid application of 'sizeof' to an incomplete type 'enum E'}} */
/* expected-note@-12 {{definition of 'enum E' is not complete until the closing '}'}} */
#endif
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Driver/experimental-library-flag.cpp
Original file line number Diff line number Diff line change
@@ -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{{.*}}
Expand Down
10 changes: 5 additions & 5 deletions clang/test/SemaCXX/attr-trivial-abi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>), "");
Expand Down Expand Up @@ -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), "");
Expand All @@ -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), "");
Expand Down

0 comments on commit 56bac6c

Please sign in to comment.