[libc-commits] [libc] [libc] Add `vasprintf` function (PR #97528)

via libc-commits libc-commits at lists.llvm.org
Tue Jul 2 23:57:43 PDT 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 3402a1a4d2d4c7ead69156c3d741fc9ae9c4d399 0ba91f8b3df548546458781d6e4fae44eacdbee3 -- libc/src/stdio/vasprintf.cpp libc/src/stdio/vasprintf.h
``````````

</details>

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

``````````diff
diff --git a/libc/src/stdio/vasprintf.cpp b/libc/src/stdio/vasprintf.cpp
index d625d98e83..712a3f72ab 100644
--- a/libc/src/stdio/vasprintf.cpp
+++ b/libc/src/stdio/vasprintf.cpp
@@ -16,8 +16,7 @@
 namespace LIBC_NAMESPACE {
 
 LLVM_LIBC_FUNCTION(int, vasprintf,
-                   (char **__restrict, const char *,
-                    va_list vlist)) {
+                   (char **__restrict, const char *, va_list vlist)) {
   internal::ArgList args(vlist); // This holder class allows for easier copying
                                  // and pointer semantics, as well as handling
                                  // destruction automatically.
diff --git a/libc/src/stdio/vasprintf.h b/libc/src/stdio/vasprintf.h
index f9b1d85ef8..c11675461e 100644
--- a/libc/src/stdio/vasprintf.h
+++ b/libc/src/stdio/vasprintf.h
@@ -14,8 +14,7 @@
 
 namespace LIBC_NAMESPACE {
 
-int vasprintf(char **__restrict s, const char * format,
-             va_list vlist);
+int vasprintf(char **__restrict s, const char *format, va_list vlist);
 
 } // namespace LIBC_NAMESPACE
 

``````````

</details>


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


More information about the libc-commits mailing list