[libc-commits] [libc] [libc] Allow hermetic timing if the `clock` function is built (PR #71092)

via libc-commits libc-commits at lists.llvm.org
Thu Nov 2 11:50:23 PDT 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 b6d67af2098fa92a557b72b7508fdd4f5e3488eb ad0fd6ecaf4726023fefe5be13e37f4e13d1d389 -- libc/test/UnitTest/LibcTest.cpp
``````````

</details>

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

``````````diff
diff --git a/libc/test/UnitTest/LibcTest.cpp b/libc/test/UnitTest/LibcTest.cpp
index 3fba95f88f0f..577fbfd31c16 100644
--- a/libc/test/UnitTest/LibcTest.cpp
+++ b/libc/test/UnitTest/LibcTest.cpp
@@ -17,8 +17,8 @@
 #include <time.h>
 #define LIBC_TEST_USE_CLOCK
 #elif defined(TARGET_SUPPORTS_CLOCK)
-#include <time.h>
 #include "src/time/clock.h"
+#include <time.h>
 extern "C" clock_t clock() noexcept { return LIBC_NAMESPACE::clock(); }
 #define LIBC_TEST_USE_CLOCK
 #endif

``````````

</details>


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


More information about the libc-commits mailing list