[libcxx-commits] [libcxx] [libcxx][modules] Ensure that __new/align_val_t.h always contains align_val_t (PR #158781)
via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Sep 15 22:53:16 PDT 2025
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/__new/align_val_t.h
``````````
: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/__new/align_val_t.h b/libcxx/include/__new/align_val_t.h
index 36fc9f336..93f673431 100644
--- a/libcxx/include/__new/align_val_t.h
+++ b/libcxx/include/__new/align_val_t.h
@@ -17,18 +17,18 @@
#endif
#if _LIBCPP_HAS_LIBRARY_ALIGNED_ALLOCATION
-#if defined(_LIBCPP_ABI_VCRUNTIME)
+# if defined(_LIBCPP_ABI_VCRUNTIME)
// std::align_val_t is defined in vcruntime_new.h
-#include <vcruntime_new.h>
-#else
+# include <vcruntime_new.h>
+# else
_LIBCPP_BEGIN_UNVERSIONED_NAMESPACE_STD
-# ifndef _LIBCPP_CXX03_LANG
+# ifndef _LIBCPP_CXX03_LANG
enum class align_val_t : size_t {};
-# else
+# else
enum align_val_t { __zero = 0, __max = (size_t)-1 };
-# endif
+# endif
_LIBCPP_END_UNVERSIONED_NAMESPACE_STD
-#endif
+# endif
#endif
#endif // _LIBCPP___NEW_ALIGN_VAL_T_H
``````````
</details>
https://github.com/llvm/llvm-project/pull/158781
More information about the libcxx-commits
mailing list