[libcxx] [test] Change LIBCXX-WINDOWS-FIXME into XFAIL: msvc for cases that succeed in mingw configurations

Add comments about the reasons for the XFAILs where there was none before.

Differential Revision: https://reviews.llvm.org/D112211

GitOrigin-RevId: a21a6ed8c23ff16cd0971606f85a00f8262064fa
diff --git a/test/std/language.support/support.dynamic/alloc.errors/set.new.handler/get_new_handler.pass.cpp b/test/std/language.support/support.dynamic/alloc.errors/set.new.handler/get_new_handler.pass.cpp
index b62d09c..4a8a610 100644
--- a/test/std/language.support/support.dynamic/alloc.errors/set.new.handler/get_new_handler.pass.cpp
+++ b/test/std/language.support/support.dynamic/alloc.errors/set.new.handler/get_new_handler.pass.cpp
@@ -8,7 +8,12 @@
 
 // test get_new_handler
 
-// XFAIL: LIBCXX-WINDOWS-FIXME
+// FIXME: When libc++ is linked against vcruntime (i.e. the default config in
+// MSVC mode), the declarations of std::set_new_handler and std::get_new_handler
+// are provided by vcruntime/UCRT's new.h. However, that header actually only
+// declares set_new_handler - it's missing a declaration of get_new_handler.
+
+// XFAIL: msvc
 
 #include <new>
 #include <cassert>
diff --git a/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp b/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp
index 6c1ecf3..6d239a5 100644
--- a/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp
+++ b/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp
@@ -8,8 +8,8 @@
 
 // UNSUPPORTED: no-exceptions
 
-// This test fails due to a stack overflow
-// XFAIL: LIBCXX-WINDOWS-FIXME
+// FIXME: This test fails in MSVC mode due to a stack overflow
+// XFAIL: msvc
 
 // <exception>
 
diff --git a/test/std/language.support/support.exception/propagation/current_exception.pass.cpp b/test/std/language.support/support.exception/propagation/current_exception.pass.cpp
index 8bad7f1..7624ea0 100644
--- a/test/std/language.support/support.exception/propagation/current_exception.pass.cpp
+++ b/test/std/language.support/support.exception/propagation/current_exception.pass.cpp
@@ -6,9 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-// This test needs to be rewritten for the Windows exception_ptr semantics
+// FIXME: This test needs to be rewritten for the MSVC exception_ptr semantics
 // which copy the exception each time the exception_ptr is copied.
-// XFAIL: LIBCXX-WINDOWS-FIXME
+// XFAIL: msvc
 
 // UNSUPPORTED: no-exceptions
 // <exception>
diff --git a/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp b/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp
index efd9ed6..521c968 100644
--- a/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp
+++ b/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp
@@ -6,7 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-// XFAIL: LIBCXX-WINDOWS-FIXME
+// FIXME: In MSVC mode, even "std::function<int(int)> f(aref);" causes
+// allocations.
+// XFAIL: msvc
 
 // <functional>
 
diff --git a/test/std/utilities/function.objects/func.wrap/func.wrap.func/noncopyable_return_type.pass.cpp b/test/std/utilities/function.objects/func.wrap/func.wrap.func/noncopyable_return_type.pass.cpp
index ee8469a..d5753a9 100644
--- a/test/std/utilities/function.objects/func.wrap/func.wrap.func/noncopyable_return_type.pass.cpp
+++ b/test/std/utilities/function.objects/func.wrap/func.wrap.func/noncopyable_return_type.pass.cpp
@@ -8,7 +8,13 @@
 
 // UNSUPPORTED: c++03, c++11, c++14
 
-// XFAIL: LIBCXX-WINDOWS-FIXME
+// FIXME: Building this in MSVC mode fails when instantiating two cases of
+// std::function that only differ in constness of the return type, with this
+// error:
+// include/c++/v1/__functional/function.h:254:31: error: definition with same mangled name '??0?$__base@$$A6AXXZ@__function@__1@std@@QEAA@XZ' as another definition
+//     _LIBCPP_INLINE_VISIBILITY __base() {}
+// include/c++/v1/__functional/function.h:254:31: note: previous definition is here
+// XFAIL: msvc
 
 // <functional>