[libcxx-commits] [libcxx] [libc++][test] Update `msvc_stdlib_force_include.h` (PR #74266)

via libcxx-commits libcxx-commits at lists.llvm.org
Sun Dec 3 17:05:58 PST 2023


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 57eb4826e5b4c99751c6eff4e4fc50b55919e5ae 3b04b0a26a59a1b6e2c7841fdd47195a956f186a -- libcxx/test/support/msvc_stdlib_force_include.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libcxx/test/support/msvc_stdlib_force_include.h b/libcxx/test/support/msvc_stdlib_force_include.h
index 1f5c1269ee..d6dee7a99b 100644
--- a/libcxx/test/support/msvc_stdlib_force_include.h
+++ b/libcxx/test/support/msvc_stdlib_force_include.h
@@ -19,14 +19,14 @@
     // Avoid assertion dialogs.
     #define _CRT_SECURE_INVALID_PARAMETER(EXPR) ::abort()
 
-    // Declare POSIX function names. (By default, Clang -fno-ms-compatibility causes them to be omitted.)
-    #define _CRT_DECLARE_NONSTDC_NAMES 1
+// Declare POSIX function names. (By default, Clang -fno-ms-compatibility causes them to be omitted.)
+#  define _CRT_DECLARE_NONSTDC_NAMES 1
 
-    // Silence warnings about POSIX function names.
-    #define _CRT_NONSTDC_NO_WARNINGS 1
+// Silence warnings about POSIX function names.
+#  define _CRT_NONSTDC_NO_WARNINGS 1
 
-    // Avoid Windows.h macroizing min() and max().
-    #define NOMINMAX 1
+// Avoid Windows.h macroizing min() and max().
+#  define NOMINMAX 1
 #endif // _LIBCXX_IN_DEVCRT
 
 #include <crtdbg.h>
@@ -54,18 +54,18 @@ const AssertionDialogAvoider assertion_dialog_avoider{};
 #if !defined(__clang__)
     // Simulate feature-test macros.
     #define __has_feature(X) _MSVC_HAS_FEATURE_ ## X
-    #define _MSVC_HAS_FEATURE_cxx_exceptions      1
-    #define _MSVC_HAS_FEATURE_cxx_rtti            1
-    #define _MSVC_HAS_FEATURE_address_sanitizer   0
-    #define _MSVC_HAS_FEATURE_hwaddress_sanitizer 0
-    #define _MSVC_HAS_FEATURE_memory_sanitizer    0
-    #define _MSVC_HAS_FEATURE_thread_sanitizer    0
-
-    #define __has_attribute(X) _MSVC_HAS_ATTRIBUTE_ ## X
-    #define _MSVC_HAS_ATTRIBUTE_vector_size     0
-
-    #define __has_builtin(X) _MSVC_HAS_BUILTIN_ ## X
-    #define _MSVC_HAS_BUILTIN___builtin_source_location 1
+#  define _MSVC_HAS_FEATURE_cxx_exceptions 1
+#  define _MSVC_HAS_FEATURE_cxx_rtti 1
+#  define _MSVC_HAS_FEATURE_address_sanitizer 0
+#  define _MSVC_HAS_FEATURE_hwaddress_sanitizer 0
+#  define _MSVC_HAS_FEATURE_memory_sanitizer 0
+#  define _MSVC_HAS_FEATURE_thread_sanitizer 0
+
+#  define __has_attribute(X) _MSVC_HAS_ATTRIBUTE_##X
+#  define _MSVC_HAS_ATTRIBUTE_vector_size 0
+
+#  define __has_builtin(X) _MSVC_HAS_BUILTIN_##X
+#  define _MSVC_HAS_BUILTIN___builtin_source_location 1
 
     // Silence compiler warnings.
     #pragma warning(disable: 4180) // qualifier applied to function type has no meaning; ignored

``````````

</details>


https://github.com/llvm/llvm-project/pull/74266


More information about the libcxx-commits mailing list