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

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Feb 25 06:09:25 PST 2023


Mordante added a comment.

LGTM, but I like to see the CI green before approving.



================
Comment at: libcxx/test/tools/clang_tidy_checks/CMakeLists.txt:6
 
-find_package(Clang 16...17)
+find_package(Clang 17)
 
----------------
philnik wrote:
> 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.
I have a fix for running CMake twice and can address this issue in the same patch, so let's revert this hunk in this patch.


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