[all-commits] [llvm/llvm-project] 10a15d: [RFC][libc++] Reworks clang-tidy selection.

Mark de Wever via All-commits all-commits at lists.llvm.org
Sat Feb 10 08:06:45 PST 2024


  Branch: refs/heads/users/mordante/clang-tidy_selection
  Home:   https://github.com/llvm/llvm-project
  Commit: 10a15df28061f1898c6beaa3e4e38f2fcbc52859
      https://github.com/llvm/llvm-project/commit/10a15df28061f1898c6beaa3e4e38f2fcbc52859
  Author: Mark de Wever <koraq at xs4all.nl>
  Date:   2024-02-10 (Sat, 10 Feb 2024)

  Changed paths:
    A cmake/Modules/LLVMVersion.cmake
    M libcxx/CMakeLists.txt
    M libcxx/test/configs/cmake-bridge.cfg.in
    M libcxx/test/tools/clang_tidy_checks/CMakeLists.txt
    M libcxx/utils/ci/run-buildbot
    M libcxx/utils/libcxx/test/config.py
    M libcxx/utils/libcxx/test/features.py
    M llvm/CMakeLists.txt
    M runtimes/CMakeLists.txt

  Log Message:
  -----------
  [RFC][libc++] Reworks clang-tidy selection.

The current selection is done in the test scipts which gives the user
no control where to find clang-tidy. The version selection itself is
hard-coded and not based on the version of clang used.

This moves the selection to configuration time and tries to find a better
match.
- Mixing the version of clang-tidy and the clang libraries causes ODR
  violations. This results in practice in crashes or incorrect results.
- Mixing the version of clang-tidy and the clang binaray sometimes causes
  issues with supported diagnotic flags. For example, flags tested against
  clang 17 may not be available in clang-tidy 16.

Currently clang-tidy 18.1 can be used, it tests against the clang
libraries version 18. This is a caused by the new LLVM version numbering
scheme.

The new selection tries to match the clang version or the version of the
HEAD and the last 3 releases. (During the release period libc++ supports 4
versions instead of the typical 3 versions.)

Note the LLVM version changes should reviewed seperately.




More information about the All-commits mailing list