[libcxx-commits] [libcxx] [libc++] Move a bunch of extensions tests to test/extensions (PR #149275)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jul 17 01:57:51 PDT 2025
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 HEAD~1 HEAD --extensions cpp -- libcxx/test/extensions/gnu/hash_map/hash_map.pass.cpp libcxx/test/extensions/gnu/hash_map/hash_map_name_lookup.pass.cpp libcxx/test/extensions/gnu/hash_set/hash_set.pass.cpp libcxx/test/extensions/gnu/hash_set/hash_set_name_lookup.pass.cpp libcxx/test/extensions/libcxx/atomics/atomics.flag/init_bool.pass.cpp libcxx/test/extensions/libcxx/containers/associative/map/scary.compile.pass.cpp libcxx/test/extensions/libcxx/containers/associative/set/scary.compile.pass.cpp libcxx/test/extensions/libcxx/containers/associative/unord.map/scary.compile.pass.cpp libcxx/test/extensions/libcxx/containers/associative/unord.set/scary.compile.pass.cpp libcxx/test/extensions/libcxx/containers/sequences/deque/incomplete.pass.cpp libcxx/test/extensions/libcxx/depr/depr.c.headers/extern_c.pass.cpp libcxx/test/extensions/libcxx/depr/depr.c.headers/include_as_c.sh.cpp libcxx/test/extensions/libcxx/depr/depr.c.headers/stdint_h.std_types_t.compile.pass.cpp libcxx/test/extensions/libcxx/depr/depr.c.headers/stdint_h.xopen_source.compile.pass.cpp libcxx/test/extensions/msvc/math_h.compile.pass.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/test/extensions/libcxx/atomics/atomics.flag/init_bool.pass.cpp b/libcxx/test/extensions/libcxx/atomics/atomics.flag/init_bool.pass.cpp
index 767877552..be8409208 100644
--- a/libcxx/test/extensions/libcxx/atomics/atomics.flag/init_bool.pass.cpp
+++ b/libcxx/test/extensions/libcxx/atomics/atomics.flag/init_bool.pass.cpp
@@ -20,24 +20,25 @@
#if TEST_STD_VER >= 11
// Ensure that static initialization happens; this is PR#37226
extern std::atomic_flag global;
-struct X { X() { global.test_and_set(); }};
+struct X {
+ X() { global.test_and_set(); }
+};
X x;
std::atomic_flag global{false};
#endif
-int main(int, char**)
-{
+int main(int, char**) {
#if TEST_STD_VER >= 11
- assert(global.test_and_set() == 1);
+ assert(global.test_and_set() == 1);
#endif
- {
- std::atomic_flag f(false);
- assert(f.test_and_set() == 0);
- }
- {
- std::atomic_flag f(true);
- assert(f.test_and_set() == 1);
- }
+ {
+ std::atomic_flag f(false);
+ assert(f.test_and_set() == 0);
+ }
+ {
+ std::atomic_flag f(true);
+ assert(f.test_and_set() == 1);
+ }
return 0;
}
diff --git a/libcxx/test/extensions/libcxx/depr/depr.c.headers/extern_c.pass.cpp b/libcxx/test/extensions/libcxx/depr/depr.c.headers/extern_c.pass.cpp
index f756aacbc..deda27767 100644
--- a/libcxx/test/extensions/libcxx/depr/depr.c.headers/extern_c.pass.cpp
+++ b/libcxx/test/extensions/libcxx/depr/depr.c.headers/extern_c.pass.cpp
@@ -48,6 +48,4 @@ extern "C" {
#endif
}
-int main(int, char**) {
- return 0;
-}
+int main(int, char**) { return 0; }
diff --git a/libcxx/test/extensions/libcxx/depr/depr.c.headers/stdint_h.std_types_t.compile.pass.cpp b/libcxx/test/extensions/libcxx/depr/depr.c.headers/stdint_h.std_types_t.compile.pass.cpp
index 3485ce755..150b6317c 100644
--- a/libcxx/test/extensions/libcxx/depr/depr.c.headers/stdint_h.std_types_t.compile.pass.cpp
+++ b/libcxx/test/extensions/libcxx/depr/depr.c.headers/stdint_h.std_types_t.compile.pass.cpp
@@ -14,250 +14,250 @@
// https://reviews.llvm.org/D59253
#define _STD_TYPES_T
-# include <stdint.h>
+#include <stdint.h>
#undef _STD_TYPES_T
#include <stdint.h>
#ifndef INT8_MIN
-#error INT8_MIN not defined
+# error INT8_MIN not defined
#endif
#ifndef INT16_MIN
-#error INT16_MIN not defined
+# error INT16_MIN not defined
#endif
#ifndef INT32_MIN
-#error INT32_MIN not defined
+# error INT32_MIN not defined
#endif
#ifndef INT64_MIN
-#error INT64_MIN not defined
+# error INT64_MIN not defined
#endif
#ifndef INT8_MAX
-#error INT8_MAX not defined
+# error INT8_MAX not defined
#endif
#ifndef INT16_MAX
-#error INT16_MAX not defined
+# error INT16_MAX not defined
#endif
#ifndef INT32_MAX
-#error INT32_MAX not defined
+# error INT32_MAX not defined
#endif
#ifndef INT64_MAX
-#error INT64_MAX not defined
+# error INT64_MAX not defined
#endif
#ifndef UINT8_MAX
-#error UINT8_MAX not defined
+# error UINT8_MAX not defined
#endif
#ifndef UINT16_MAX
-#error UINT16_MAX not defined
+# error UINT16_MAX not defined
#endif
#ifndef UINT32_MAX
-#error UINT32_MAX not defined
+# error UINT32_MAX not defined
#endif
#ifndef UINT64_MAX
-#error UINT64_MAX not defined
+# error UINT64_MAX not defined
#endif
#ifndef INT_LEAST8_MIN
-#error INT_LEAST8_MIN not defined
+# error INT_LEAST8_MIN not defined
#endif
#ifndef INT_LEAST16_MIN
-#error INT_LEAST16_MIN not defined
+# error INT_LEAST16_MIN not defined
#endif
#ifndef INT_LEAST32_MIN
-#error INT_LEAST32_MIN not defined
+# error INT_LEAST32_MIN not defined
#endif
#ifndef INT_LEAST64_MIN
-#error INT_LEAST64_MIN not defined
+# error INT_LEAST64_MIN not defined
#endif
#ifndef INT_LEAST8_MAX
-#error INT_LEAST8_MAX not defined
+# error INT_LEAST8_MAX not defined
#endif
#ifndef INT_LEAST16_MAX
-#error INT_LEAST16_MAX not defined
+# error INT_LEAST16_MAX not defined
#endif
#ifndef INT_LEAST32_MAX
-#error INT_LEAST32_MAX not defined
+# error INT_LEAST32_MAX not defined
#endif
#ifndef INT_LEAST64_MAX
-#error INT_LEAST64_MAX not defined
+# error INT_LEAST64_MAX not defined
#endif
#ifndef UINT_LEAST8_MAX
-#error UINT_LEAST8_MAX not defined
+# error UINT_LEAST8_MAX not defined
#endif
#ifndef UINT_LEAST16_MAX
-#error UINT_LEAST16_MAX not defined
+# error UINT_LEAST16_MAX not defined
#endif
#ifndef UINT_LEAST32_MAX
-#error UINT_LEAST32_MAX not defined
+# error UINT_LEAST32_MAX not defined
#endif
#ifndef UINT_LEAST64_MAX
-#error UINT_LEAST64_MAX not defined
+# error UINT_LEAST64_MAX not defined
#endif
#ifndef INT_FAST8_MIN
-#error INT_FAST8_MIN not defined
+# error INT_FAST8_MIN not defined
#endif
#ifndef INT_FAST16_MIN
-#error INT_FAST16_MIN not defined
+# error INT_FAST16_MIN not defined
#endif
#ifndef INT_FAST32_MIN
-#error INT_FAST32_MIN not defined
+# error INT_FAST32_MIN not defined
#endif
#ifndef INT_FAST64_MIN
-#error INT_FAST64_MIN not defined
+# error INT_FAST64_MIN not defined
#endif
#ifndef INT_FAST8_MAX
-#error INT_FAST8_MAX not defined
+# error INT_FAST8_MAX not defined
#endif
#ifndef INT_FAST16_MAX
-#error INT_FAST16_MAX not defined
+# error INT_FAST16_MAX not defined
#endif
#ifndef INT_FAST32_MAX
-#error INT_FAST32_MAX not defined
+# error INT_FAST32_MAX not defined
#endif
#ifndef INT_FAST64_MAX
-#error INT_FAST64_MAX not defined
+# error INT_FAST64_MAX not defined
#endif
#ifndef UINT_FAST8_MAX
-#error UINT_FAST8_MAX not defined
+# error UINT_FAST8_MAX not defined
#endif
#ifndef UINT_FAST16_MAX
-#error UINT_FAST16_MAX not defined
+# error UINT_FAST16_MAX not defined
#endif
#ifndef UINT_FAST32_MAX
-#error UINT_FAST32_MAX not defined
+# error UINT_FAST32_MAX not defined
#endif
#ifndef UINT_FAST64_MAX
-#error UINT_FAST64_MAX not defined
+# error UINT_FAST64_MAX not defined
#endif
#ifndef INTPTR_MIN
-#error INTPTR_MIN not defined
+# error INTPTR_MIN not defined
#endif
#ifndef INTPTR_MAX
-#error INTPTR_MAX not defined
+# error INTPTR_MAX not defined
#endif
#ifndef UINTPTR_MAX
-#error UINTPTR_MAX not defined
+# error UINTPTR_MAX not defined
#endif
#ifndef INTMAX_MIN
-#error INTMAX_MIN not defined
+# error INTMAX_MIN not defined
#endif
#ifndef INTMAX_MAX
-#error INTMAX_MAX not defined
+# error INTMAX_MAX not defined
#endif
#ifndef UINTMAX_MAX
-#error UINTMAX_MAX not defined
+# error UINTMAX_MAX not defined
#endif
#ifndef PTRDIFF_MIN
-#error PTRDIFF_MIN not defined
+# error PTRDIFF_MIN not defined
#endif
#ifndef PTRDIFF_MAX
-#error PTRDIFF_MAX not defined
+# error PTRDIFF_MAX not defined
#endif
#ifndef SIG_ATOMIC_MIN
-#error SIG_ATOMIC_MIN not defined
+# error SIG_ATOMIC_MIN not defined
#endif
#ifndef SIG_ATOMIC_MAX
-#error SIG_ATOMIC_MAX not defined
+# error SIG_ATOMIC_MAX not defined
#endif
#ifndef SIZE_MAX
-#error SIZE_MAX not defined
+# error SIZE_MAX not defined
#endif
#ifndef WCHAR_MIN
-#error WCHAR_MIN not defined
+# error WCHAR_MIN not defined
#endif
#ifndef WCHAR_MAX
-#error WCHAR_MAX not defined
+# error WCHAR_MAX not defined
#endif
#ifndef WINT_MIN
-#error WINT_MIN not defined
+# error WINT_MIN not defined
#endif
#ifndef WINT_MAX
-#error WINT_MAX not defined
+# error WINT_MAX not defined
#endif
#ifndef INT8_C
-#error INT8_C not defined
+# error INT8_C not defined
#endif
#ifndef INT16_C
-#error INT16_C not defined
+# error INT16_C not defined
#endif
#ifndef INT32_C
-#error INT32_C not defined
+# error INT32_C not defined
#endif
#ifndef INT64_C
-#error INT64_C not defined
+# error INT64_C not defined
#endif
#ifndef UINT8_C
-#error UINT8_C not defined
+# error UINT8_C not defined
#endif
#ifndef UINT16_C
-#error UINT16_C not defined
+# error UINT16_C not defined
#endif
#ifndef UINT32_C
-#error UINT32_C not defined
+# error UINT32_C not defined
#endif
#ifndef UINT64_C
-#error UINT64_C not defined
+# error UINT64_C not defined
#endif
#ifndef INTMAX_C
-#error INTMAX_C not defined
+# error INTMAX_C not defined
#endif
#ifndef UINTMAX_C
-#error UINTMAX_C not defined
+# error UINTMAX_C not defined
#endif
diff --git a/libcxx/test/extensions/libcxx/depr/depr.c.headers/stdint_h.xopen_source.compile.pass.cpp b/libcxx/test/extensions/libcxx/depr/depr.c.headers/stdint_h.xopen_source.compile.pass.cpp
index 75a4ab908..ef59f7c92 100644
--- a/libcxx/test/extensions/libcxx/depr/depr.c.headers/stdint_h.xopen_source.compile.pass.cpp
+++ b/libcxx/test/extensions/libcxx/depr/depr.c.headers/stdint_h.xopen_source.compile.pass.cpp
@@ -19,245 +19,245 @@
#include <stdint.h>
#ifndef INT8_MIN
-#error INT8_MIN not defined
+# error INT8_MIN not defined
#endif
#ifndef INT16_MIN
-#error INT16_MIN not defined
+# error INT16_MIN not defined
#endif
#ifndef INT32_MIN
-#error INT32_MIN not defined
+# error INT32_MIN not defined
#endif
#ifndef INT64_MIN
-#error INT64_MIN not defined
+# error INT64_MIN not defined
#endif
#ifndef INT8_MAX
-#error INT8_MAX not defined
+# error INT8_MAX not defined
#endif
#ifndef INT16_MAX
-#error INT16_MAX not defined
+# error INT16_MAX not defined
#endif
#ifndef INT32_MAX
-#error INT32_MAX not defined
+# error INT32_MAX not defined
#endif
#ifndef INT64_MAX
-#error INT64_MAX not defined
+# error INT64_MAX not defined
#endif
#ifndef UINT8_MAX
-#error UINT8_MAX not defined
+# error UINT8_MAX not defined
#endif
#ifndef UINT16_MAX
-#error UINT16_MAX not defined
+# error UINT16_MAX not defined
#endif
#ifndef UINT32_MAX
-#error UINT32_MAX not defined
+# error UINT32_MAX not defined
#endif
#ifndef UINT64_MAX
-#error UINT64_MAX not defined
+# error UINT64_MAX not defined
#endif
#ifndef INT_LEAST8_MIN
-#error INT_LEAST8_MIN not defined
+# error INT_LEAST8_MIN not defined
#endif
#ifndef INT_LEAST16_MIN
-#error INT_LEAST16_MIN not defined
+# error INT_LEAST16_MIN not defined
#endif
#ifndef INT_LEAST32_MIN
-#error INT_LEAST32_MIN not defined
+# error INT_LEAST32_MIN not defined
#endif
#ifndef INT_LEAST64_MIN
-#error INT_LEAST64_MIN not defined
+# error INT_LEAST64_MIN not defined
#endif
#ifndef INT_LEAST8_MAX
-#error INT_LEAST8_MAX not defined
+# error INT_LEAST8_MAX not defined
#endif
#ifndef INT_LEAST16_MAX
-#error INT_LEAST16_MAX not defined
+# error INT_LEAST16_MAX not defined
#endif
#ifndef INT_LEAST32_MAX
-#error INT_LEAST32_MAX not defined
+# error INT_LEAST32_MAX not defined
#endif
#ifndef INT_LEAST64_MAX
-#error INT_LEAST64_MAX not defined
+# error INT_LEAST64_MAX not defined
#endif
#ifndef UINT_LEAST8_MAX
-#error UINT_LEAST8_MAX not defined
+# error UINT_LEAST8_MAX not defined
#endif
#ifndef UINT_LEAST16_MAX
-#error UINT_LEAST16_MAX not defined
+# error UINT_LEAST16_MAX not defined
#endif
#ifndef UINT_LEAST32_MAX
-#error UINT_LEAST32_MAX not defined
+# error UINT_LEAST32_MAX not defined
#endif
#ifndef UINT_LEAST64_MAX
-#error UINT_LEAST64_MAX not defined
+# error UINT_LEAST64_MAX not defined
#endif
#ifndef INT_FAST8_MIN
-#error INT_FAST8_MIN not defined
+# error INT_FAST8_MIN not defined
#endif
#ifndef INT_FAST16_MIN
-#error INT_FAST16_MIN not defined
+# error INT_FAST16_MIN not defined
#endif
#ifndef INT_FAST32_MIN
-#error INT_FAST32_MIN not defined
+# error INT_FAST32_MIN not defined
#endif
#ifndef INT_FAST64_MIN
-#error INT_FAST64_MIN not defined
+# error INT_FAST64_MIN not defined
#endif
#ifndef INT_FAST8_MAX
-#error INT_FAST8_MAX not defined
+# error INT_FAST8_MAX not defined
#endif
#ifndef INT_FAST16_MAX
-#error INT_FAST16_MAX not defined
+# error INT_FAST16_MAX not defined
#endif
#ifndef INT_FAST32_MAX
-#error INT_FAST32_MAX not defined
+# error INT_FAST32_MAX not defined
#endif
#ifndef INT_FAST64_MAX
-#error INT_FAST64_MAX not defined
+# error INT_FAST64_MAX not defined
#endif
#ifndef UINT_FAST8_MAX
-#error UINT_FAST8_MAX not defined
+# error UINT_FAST8_MAX not defined
#endif
#ifndef UINT_FAST16_MAX
-#error UINT_FAST16_MAX not defined
+# error UINT_FAST16_MAX not defined
#endif
#ifndef UINT_FAST32_MAX
-#error UINT_FAST32_MAX not defined
+# error UINT_FAST32_MAX not defined
#endif
#ifndef UINT_FAST64_MAX
-#error UINT_FAST64_MAX not defined
+# error UINT_FAST64_MAX not defined
#endif
#ifndef INTPTR_MIN
-#error INTPTR_MIN not defined
+# error INTPTR_MIN not defined
#endif
#ifndef INTPTR_MAX
-#error INTPTR_MAX not defined
+# error INTPTR_MAX not defined
#endif
#ifndef UINTPTR_MAX
-#error UINTPTR_MAX not defined
+# error UINTPTR_MAX not defined
#endif
#ifndef INTMAX_MIN
-#error INTMAX_MIN not defined
+# error INTMAX_MIN not defined
#endif
#ifndef INTMAX_MAX
-#error INTMAX_MAX not defined
+# error INTMAX_MAX not defined
#endif
#ifndef UINTMAX_MAX
-#error UINTMAX_MAX not defined
+# error UINTMAX_MAX not defined
#endif
#ifndef PTRDIFF_MIN
-#error PTRDIFF_MIN not defined
+# error PTRDIFF_MIN not defined
#endif
#ifndef PTRDIFF_MAX
-#error PTRDIFF_MAX not defined
+# error PTRDIFF_MAX not defined
#endif
#ifndef SIG_ATOMIC_MIN
-#error SIG_ATOMIC_MIN not defined
+# error SIG_ATOMIC_MIN not defined
#endif
#ifndef SIG_ATOMIC_MAX
-#error SIG_ATOMIC_MAX not defined
+# error SIG_ATOMIC_MAX not defined
#endif
#ifndef SIZE_MAX
-#error SIZE_MAX not defined
+# error SIZE_MAX not defined
#endif
#ifndef WCHAR_MIN
-#error WCHAR_MIN not defined
+# error WCHAR_MIN not defined
#endif
#ifndef WCHAR_MAX
-#error WCHAR_MAX not defined
+# error WCHAR_MAX not defined
#endif
#ifndef WINT_MIN
-#error WINT_MIN not defined
+# error WINT_MIN not defined
#endif
#ifndef WINT_MAX
-#error WINT_MAX not defined
+# error WINT_MAX not defined
#endif
#ifndef INT8_C
-#error INT8_C not defined
+# error INT8_C not defined
#endif
#ifndef INT16_C
-#error INT16_C not defined
+# error INT16_C not defined
#endif
#ifndef INT32_C
-#error INT32_C not defined
+# error INT32_C not defined
#endif
#ifndef INT64_C
-#error INT64_C not defined
+# error INT64_C not defined
#endif
#ifndef UINT8_C
-#error UINT8_C not defined
+# error UINT8_C not defined
#endif
#ifndef UINT16_C
-#error UINT16_C not defined
+# error UINT16_C not defined
#endif
#ifndef UINT32_C
-#error UINT32_C not defined
+# error UINT32_C not defined
#endif
#ifndef UINT64_C
-#error UINT64_C not defined
+# error UINT64_C not defined
#endif
#ifndef INTMAX_C
-#error INTMAX_C not defined
+# error INTMAX_C not defined
#endif
#ifndef UINTMAX_C
-#error UINTMAX_C not defined
+# error UINTMAX_C not defined
#endif
diff --git a/libcxx/test/extensions/msvc/math_h.compile.pass.cpp b/libcxx/test/extensions/msvc/math_h.compile.pass.cpp
index 045745b5f..fcf1b40f8 100644
--- a/libcxx/test/extensions/msvc/math_h.compile.pass.cpp
+++ b/libcxx/test/extensions/msvc/math_h.compile.pass.cpp
@@ -16,11 +16,11 @@
//
#ifdef _MSC_VER
-# include <math.h>
-# define _USE_MATH_DEFINES
-# include <math.h>
+# include <math.h>
+# define _USE_MATH_DEFINES
+# include <math.h>
-# ifndef M_PI
-# error M_PI not defined
-# endif
+# ifndef M_PI
+# error M_PI not defined
+# endif
#endif
``````````
</details>
https://github.com/llvm/llvm-project/pull/149275
More information about the libcxx-commits
mailing list