[libc-commits] [libc] [libc] Add internal locale structures and config options (PR #211470)

via libc-commits libc-commits at lists.llvm.org
Wed Jul 22 23:49:48 PDT 2026


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 -- libc/src/locale/locale_data.h libc/src/locale/locale.cpp libc/src/locale/locale.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/libc/src/locale/locale.cpp b/libc/src/locale/locale.cpp
index abfcd3fcb..dea2c6e67 100644
--- a/libc/src/locale/locale.cpp
+++ b/libc/src/locale/locale.cpp
@@ -12,9 +12,9 @@
 //===----------------------------------------------------------------------===//
 
 #include "src/locale/locale.h"
-#include "src/locale/locale_data.h"
 #include "src/__support/common.h"
 #include "src/__support/macros/config.h"
+#include "src/locale/locale_data.h"
 
 namespace LIBC_NAMESPACE_DECL {
 
@@ -35,8 +35,8 @@ const LcTimeData C_TIME_DATA = {
     {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"},
     {"January", "February", "March", "April", "May", "June", "July", "August",
      "September", "October", "November", "December"},
-    {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov",
-     "Dec"},
+    {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct",
+     "Nov", "Dec"},
     "",
     "",
     "",
@@ -52,7 +52,7 @@ __locale_t c_locale = {{nullptr}};
 __locale_t utf8_locale = {{
     reinterpret_cast<__locale_data *>(
         const_cast<LcCtypeData *>(&UTF8_CTYPE_DATA)), // LC_CTYPE
-    nullptr,                                         // LC_NUMERIC
+    nullptr,                                          // LC_NUMERIC
     nullptr,                                          // LC_TIME
     nullptr,                                          // LC_COLLATE
     nullptr,                                          // LC_MONETARY

``````````

</details>


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


More information about the libc-commits mailing list