[libcxx-commits] [libcxx] 23f7f56 - [libcxx] [test] Fix the include_as_c.sh.cpp test in MSVC configurations
Martin Storsjö via libcxx-commits
libcxx-commits at lists.llvm.org
Mon May 31 12:13:52 PDT 2021
Author: Martin Storsjö
Date: 2021-05-31T22:13:22+03:00
New Revision: 23f7f56cecf9015f5fbee5b502430fd6985d269a
URL: https://github.com/llvm/llvm-project/commit/23f7f56cecf9015f5fbee5b502430fd6985d269a
DIFF: https://github.com/llvm/llvm-project/commit/23f7f56cecf9015f5fbee5b502430fd6985d269a.diff
LOG: [libcxx] [test] Fix the include_as_c.sh.cpp test in MSVC configurations
Avoid including a header that is known not to work with clang in MSVC
mode when compiling as C.
(Alternatively, this could be something like "XFAIL: clang && msvc",
but I think it's more useful to actually check the rest of the test
instead of expecting the whole test to fail.)
Differential Revision: https://reviews.llvm.org/D103400
Added:
Modified:
libcxx/test/libcxx/include_as_c.sh.cpp
Removed:
################################################################################
diff --git a/libcxx/test/libcxx/include_as_c.sh.cpp b/libcxx/test/libcxx/include_as_c.sh.cpp
index bbdcd022940b..3fc4f1f07641 100644
--- a/libcxx/test/libcxx/include_as_c.sh.cpp
+++ b/libcxx/test/libcxx/include_as_c.sh.cpp
@@ -14,8 +14,6 @@
// file as C, but we're passing C++ flags on the command-line.
// UNSUPPORTED: gcc
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
// Test that the C wrapper headers can be included when compiling them as C.
// NOTE: It's not common or recommended to have libc++ in the header search
@@ -43,7 +41,11 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <tgmath.h>
+// The clang-shipped tgmath.h header doesn't work with MSVC/UCRT's complex
+// headers in C mode, see PR46207.
+#ifndef _MSC_VER
+# include <tgmath.h>
+#endif
#include <wchar.h>
#include <wctype.h>
More information about the libcxx-commits
mailing list