[libcxx-commits] [PATCH] D149455: [libc++][test] Prefers the newer clang-tidy version.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun May 28 03:24:12 PDT 2023


Mordante updated this revision to Diff 526320.
Mordante added a comment.
Herald added a subscriber: arichardson.

Adds an extra test.
Rebased on top of D151223 <https://reviews.llvm.org/D151223>.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149455

Files:
  libcxx/test/tools/clang_tidy_checks/CMakeLists.txt
  libcxx/utils/libcxx/test/features.py


Index: libcxx/utils/libcxx/test/features.py
===================================================================
--- libcxx/utils/libcxx/test/features.py
+++ libcxx/utils/libcxx/test/features.py
@@ -38,6 +38,10 @@
         ):
             return None
 
+        # TODO MODULES require ToT due module specific fixes.
+        if runScriptExitCode(cfg, ['clang-tidy-17 --version']) == 0:
+          return 'clang-tidy-17'
+
         # TODO This should be the last stable release.
         # LLVM RELEASE bump to latest stable version
         if runScriptExitCode(cfg, ["clang-tidy-16 --version"]) == 0:
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
@@ -1,17 +1,17 @@
 
-# Look for the latest package
-set(CMAKE_FIND_PACKAGE_SORT_ORDER NATURAL)
-set(CMAKE_FIND_PACKAGE_SORT_DIRECTION DEC)
-
 # The find_package changes these variables. This leaves the build in an odd
 # state. Calling cmake a second time tries to write site config information in
 # the system's libc++. Restoring these setting after testing fixes this issue.
 set(LLVM_DIR_SAVE ${LLVM_DIR})
 set(Clang_DIR_SAVE ${Clang_DIR})
 
-find_package(Clang 16)
+# TODO LLVM 17 prefer to sue teh stable release again instead of ToT.
+# libc++ normally prefers the use the last stable release instead of the ToT.
+# For modules we need ToT since they are still under heavy development. So
+# temporary the ToT version is preferred.
+find_package(Clang 17)
 if (NOT Clang_FOUND)
-  find_package(Clang 17)
+  find_package(Clang 16)
 endif()
 
 set(SOURCES


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149455.526320.patch
Type: text/x-patch
Size: 1698 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230528/80caf3ec/attachment.bin>


More information about the libcxx-commits mailing list