[libcxx-commits] [libcxx] [libc++] Granularize the <new> header (PR #119270)

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Dec 10 12:57:51 PST 2024


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 7ea1fe773225fe88fd3ceb0aa17152eec496d135 1128bdd50ee3f8b755be3ffc06c3544803db46be --extensions h,,cpp -- libcxx/include/__new/align_val_t.h libcxx/include/__new/allocate.h libcxx/include/__new/destroying_delete_t.h libcxx/include/__new/exceptions.h libcxx/include/__new/interference_size.h libcxx/include/__new/launder.h libcxx/include/__new/new_handler.h libcxx/include/__new/nothrow_t.h libcxx/include/__new/operator_new_delete.h libcxx/include/__hash_table libcxx/include/__memory/allocator.h libcxx/include/__memory/builtin_new_allocator.h libcxx/include/__memory/shared_ptr.h libcxx/include/__memory/uninitialized_algorithms.h libcxx/include/__utility/small_buffer.h libcxx/include/future libcxx/include/new libcxx/test/std/language.support/support.dynamic/alloc.errors/bad.alloc/bad_alloc.pass.cpp libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_array.pass.cpp libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.types.verify.cpp libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp
``````````

</details>

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

``````````diff
diff --git a/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.types.verify.cpp b/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.types.verify.cpp
index cf93aee752..65b72aef95 100644
--- a/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.types.verify.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/ptr.launder/launder.types.verify.cpp
@@ -26,11 +26,12 @@ int main(int, char**)
     (void) std::launder((               void *) nullptr);
     (void) std::launder((const          void *) nullptr);
     (void) std::launder((      volatile void *) nullptr);
-    (void) std::launder((const volatile void *) nullptr);  // expected-error-re@*:* 4 {{static assertion failed{{.*}}can't launder cv-void}}
+    (void)std::launder((
+        const volatile void*)nullptr); // expected-error-re@*:* 4 {{static assertion failed{{.*}}can't launder cv-void}}
     // expected-error@*:* 0-4 {{void pointer argument to '__builtin_launder' is not allowed}}
 
-    (void) std::launder(foo);                              // expected-error-re@*:* 1 {{static assertion failed{{.*}}can't launder functions}}
+    (void)std::launder(foo); // expected-error-re@*:* 1 {{static assertion failed{{.*}}can't launder functions}}
     // expected-error@*:* 0-1 {{function pointer argument to '__builtin_launder' is not allowed}}
 
-  return 0;
+    return 0;
 }

``````````

</details>


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


More information about the libcxx-commits mailing list