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 origin/main HEAD --extensions ,cpp,h -- 
clang/lib/Headers/errno.h clang/lib/Headers/math.h clang/lib/Headers/stdlib.h 
clang/lib/Headers/string.h clang/lib/Headers/wchar.h 
libcxx/test/libcxx/libcpp_freestanding.sh.cpp libcxx/include/__algorithm/sort.h 
libcxx/include/__config libcxx/include/ctime libcxx/include/stdio.h 
--diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

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

``````````diff
diff --git a/libcxx/include/ctime b/libcxx/include/ctime
index d594f7d49..6140faed9 100644
--- a/libcxx/include/ctime
+++ b/libcxx/include/ctime
@@ -52,17 +52,17 @@ int timespec_get( struct timespec *ts, int base); // C++17
 #  include <__cstddef/size_t.h>
 
 // <time.h> is not provided by libc++
-#if __STDC_HOSTED__ && __has_include(<time.h>)
-#  include <time.h>
-#  ifdef _LIBCPP_TIME_H
-#    error "If libc++ starts defining <time.h>, the __has_include check should 
move to libc++'s <time.h>"
-#  endif
-#else
-#  include <cstdint>
+#  if __STDC_HOSTED__ && __has_include(<time.h>)
+#    include <time.h>
+#    ifdef _LIBCPP_TIME_H
+#      error "If libc++ starts defining <time.h>, the __has_include check 
should move to libc++'s <time.h>"
+#    endif
+#  else
+#    include <cstdint>
 extern "C" {
 typedef ::std::uint_least64_t time_t;
 }
-#endif
+#  endif
 
 #  if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #    pragma GCC system_header

``````````

</details>


https://github.com/llvm/llvm-project/pull/208900
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to