[libcxx-commits] [libcxx] [AIX][libc++] Forward-declare locale functions in aix.h when _XOPEN_SOURCE < 700 (PR #220508)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Sep 2 01:02:06 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 h -- libcxx/include/__locale_dir/support/aix.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/__locale_dir/support/aix.h b/libcxx/include/__locale_dir/support/aix.h
index 839824d27..2064a6a9a 100644
--- a/libcxx/include/__locale_dir/support/aix.h
+++ b/libcxx/include/__locale_dir/support/aix.h
@@ -26,14 +26,14 @@
#endif
// Forward declare for _XOPEN_SOURCE=500 and _XOPEN_SOURCE=600
- #if defined(_XOPEN_SOURCE) && _XOPEN_SOURCE < 700
- extern "C" {
- locale_t newlocale(int, const char*, locale_t) noexcept;
- locale_t duplocale(locale_t) noexcept;
- locale_t uselocale(locale_t) noexcept;
- void freelocale(locale_t) noexcept;
- }
- #endif // defined(_XOPEN_SOURCE) && _XOPEN_SOURCE < 700
+#if defined(_XOPEN_SOURCE) && _XOPEN_SOURCE < 700
+extern "C" {
+locale_t newlocale(int, const char*, locale_t) noexcept;
+locale_t duplocale(locale_t) noexcept;
+locale_t uselocale(locale_t) noexcept;
+void freelocale(locale_t) noexcept;
+}
+#endif // defined(_XOPEN_SOURCE) && _XOPEN_SOURCE < 700
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
``````````
</details>
https://github.com/llvm/llvm-project/pull/220508
More information about the libcxx-commits
mailing list