[PATCH] D150264: [libcxx] Add strict weak ordering checks to sorting algorithms

Nikolas Klauser via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 15 09:55:43 PDT 2023


philnik added inline comments.


================
Comment at: libcxx/include/__debug_utils/strict_weak_ordering_check.h:14
+
+#ifdef _LIBCPP_DEBUG_STRICT_WEAK_ORDERING_CHECK
+#  include <__algorithm/comp_ref_type.h>
----------------
danlark wrote:
> philnik wrote:
> > IMO we shouldn't include stuff based on whether we are in debug mode or not.
> This is consistent with __debug_utils/randomize_range. I believe the intention is not to expose more headers than needed for compile times
I can't remember why I did it that way, but the compile times for these headers are mot likely not relevant. This is also not the style in the rest of the code base.


================
Comment at: libcxx/utils/data/ignore_format.txt:308
 libcxx/include/__debug_utils/randomize_range.h
+libcxx/include/__debug_utils/strict_weak_ordering_check.h
 libcxx/include/deque
----------------
philnik wrote:
> Please clang-format the header.
When the header is formatted this change shouldn't be necessary.


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

https://reviews.llvm.org/D150264



More information about the llvm-commits mailing list