Skip to content

Commit a4681df

Browse files
mstorsjotstellar
authored andcommitted
[libcxx] [test] Avoid spurious test breakage in clang-cl-dll configs with newer CMake
The pointer.volatile.pass.cpp test was already marked as XFAIL for mingw-dll (for reasons explained in the comment above it). The same issue also appears in clang-cl-dll when built with newer CMake versions. (It didn't appear with older versions of CMake, as CMake built the library with the clang-cl flag `-std:c++latest` when we've requested C++ 20 - which practically built it in c++2b mode with current clang versions. With current versions of CMake, it passes `-std:c++20` instead.) As it succeeds/fails dependent on factors we don't directly control, mark it as UNSUPPORTED instead of XFAIL. Differential Revision: https://reviews.llvm.org/D122718 (cherry picked from commit b048397)
1 parent db07d9f commit a4681df

File tree

1 file changed

+13
-3
lines changed
  • libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic

1 file changed

+13
-3
lines changed

libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/pointer.volatile.pass.cpp

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,22 @@
1010

1111
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
1212

13-
// This test fails on MinGW DLL configurations, due to
13+
// This test fails in Windows DLL configurations, due to
1414
// __exclude_from_explicit_instantiation__ not behaving as it should in
1515
// combination with dllimport (https://llvm.org/PR41018), in combination
1616
// with running tests in c++2b mode while building the library in c++20 mode.
17-
// (If the library was built in c++2b mode, this test would succeed.)
18-
// XFAIL: target={{.+}}-windows-gnu && windows-dll
17+
//
18+
// If the library was built in c++2b mode, this test would succeed.
19+
//
20+
// Older CMake passed -std:c++latest to set C++ 20 mode on clang-cl, which
21+
// hid this issue. With newer CMake versions, it passes -std:c++20 which
22+
// makes this fail.
23+
//
24+
// Marking as UNSUPPORTED instead of XFAIL to avoid spurious failures/successes
25+
// depending on the version of CMake used.
26+
// TODO: Remove this when the library is built in c++2b mode.
27+
//
28+
// UNSUPPORTED: windows-dll
1929

2030
// template <class charT, class traits = char_traits<charT> >
2131
// class basic_ostream;

0 commit comments

Comments
 (0)