[libcxx-commits] [PATCH] D108231: [NFC][SystemZ][z/OS] Run clang-format on libcxxabi/src/cxa_guard_impl.h

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Aug 17 15:22:38 PDT 2021


ldionne requested changes to this revision.
ldionne added a comment.
This revision now requires changes to proceed.

I'd normally frown upon this since we generally don't clang-format whole files at once, but since the changes are pretty small, it might be OK to do that. But we definitely want to clang-format it right though.



================
Comment at: libcxxabi/src/cxa_guard_impl.h:44-46
+#if __has_include(<sys/syscall.h>)
+#include <sys/syscall.h>
+#endif
----------------
We definitely want to tweak our clang-format configuration such that nested `#if`s are indented. It's really difficult to read otherwise (kind of like if we did not indent regular nested `if (...)` statements).


================
Comment at: libcxxabi/src/cxa_guard_impl.h:136
+  bool compare_exchange(IntType* expected, IntType desired,
+                        MemoryOrder ord_success, MemoryOrder ord_failure) {
+    return std::__libcpp_atomic_compare_exchange(b_, expected, desired,
----------------
The line length here is 80, but we use 120 in libc++ unless I'm mistaken. I think we should be using the same configuration for libc++ and libc++abi.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108231/new/

https://reviews.llvm.org/D108231



More information about the libcxx-commits mailing list