[libcxx-commits] [PATCH] D144261: [libc++] Add clang-tidy check for version checks

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 21 09:39:16 PST 2023


philnik added a comment.

In D144261#4142106 <https://reviews.llvm.org/D144261#4142106>, @Mordante wrote:

> Are we running clang-tidy only on our headers or also on our test suite?

Only in our headers currently, not even in `src/`.



================
Comment at: libcxx/test/tools/clang_tidy_checks/CMakeLists.txt:6
 
-find_package(Clang 16...17)
+find_package(Clang 17)
 
----------------
Mordante wrote:
> This should be 16 for the CI. IIRC 17 is not installed by the CI.
> I ran issues with this while testing locally with Clang-tidy, I am looking at the issue where `cmake` fails to run a second time and I have a solution, but I want to test a bit further before making a patch.
This diff shouldn't be here. The problem is that `find_package(Clang 16...17)` isn't "use Clang version 16 or 17", like one would expect. I'm not sure what it actually is, but AFAICT we have to use
```
find_package(Clang 16)
if (NOT Clang_FOUND)
  find_package(Clang 17)
endif()
```
to fix this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144261



More information about the libcxx-commits mailing list