[libcxx-commits] [PATCH] D142973: [libc++] Look for Clang 17 when compiling clang-tidy checks

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jan 31 04:05:28 PST 2023


philnik created this revision.
philnik added reviewers: ldionne, Mordante, var-const.
Herald added a project: All.
philnik requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

This allows compiling the clang-tidy checks when you only have ToT clang


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142973

Files:
  libcxx/test/tools/clang_tidy_checks/CMakeLists.txt


Index: libcxx/test/tools/clang_tidy_checks/CMakeLists.txt
===================================================================
--- libcxx/test/tools/clang_tidy_checks/CMakeLists.txt
+++ libcxx/test/tools/clang_tidy_checks/CMakeLists.txt
@@ -3,7 +3,11 @@
 set(CMAKE_FIND_PACKAGE_SORT_ORDER NATURAL)
 set(CMAKE_FIND_PACKAGE_SORT_DIRECTION DEC)
 
-find_package(Clang 16)
+find_package(Clang 17)
+
+if(NOT Clang_FOUND)
+  find_package(Clang 16)
+endif()
 
 set(SOURCES
     abi_tag_on_virtual.cpp


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142973.493559.patch
Type: text/x-patch
Size: 492 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230131/f5d4c1ac/attachment.bin>


More information about the libcxx-commits mailing list