[libcxx-commits] [PATCH] D153672: [libc++] Remove the legacy debug mode.
Konstantin Varlamov via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jun 29 10:47:35 PDT 2023
var-const added inline comments.
================
Comment at: libcxx/include/__algorithm/comp_ref_type.h:53
__do_compare_assert(int, _LHS & __l, _RHS & __r) {
- _LIBCPP_DEBUG_ASSERT(!__comp_(__l, __r),
+ _LIBCPP_ASSERT_UNCATEGORIZED(!__comp_(__l, __r),
"Comparator does not induce a strict weak ordering");
----------------
ldionne wrote:
> var-const wrote:
> > I'm getting a weird CI failure on this line from our custom `clang-tidy` checks:
> > ```
> > comp_ref_type.h:53:9: error: ADL lookup [libcpp-robust-against-adl,-warnings-as-errors]
> > 53 | _LIBCPP_ASSERT(!__comp_(__l, __r),
> > ```
> > I don't see how calling `__comp_` would involve ADL given that it's a reference (also other calls to `__comp_` in this file are not flagged).
> >
> > How do I run the `clang-tidy` tests locally in a Docker container? I tried copying the `clang-tidy` invocation from the CI, but it looks like my local build is missing `/llvm/build/generic-cxx23/libcxx/test/tools/clang_tidy_checks/libcxx-tidy.plugin`.
> Use `export ENABLE_CLANG_TIDY=On` before you do `run-buildbot` in the docker image!
>
> This can be seen done in `buildkite-pipeline.yml`. This will cause `-DLIBCXX_ENABLE_CLANG_TIDY=On` to be passed to the CMake, and the plugin to be compiled.
Thanks! Looks like the file was simply missing the `<__assert>` include so that `clang-tidy` must have thought that `_LIBCPP_ASSERT_UNCATEGORIZED` is an undeclared function, resulting in a false positive.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153672/new/
https://reviews.llvm.org/D153672
More information about the libcxx-commits
mailing list