Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libc++] Use clang-tidy version that matches the compiler we use in the CI #85305

Merged
merged 1 commit into from
Mar 16, 2024

Conversation

ldionne
Copy link
Member

@ldionne ldionne commented Mar 14, 2024

This works around ODR violations in the clang-tidy plugin we use to perform the modules tests.

Fixes #85242

…he CI

This works around ODR violations in the clang-tidy plugin we use to
perform the modules tests.

Fixes llvm#85242
@ldionne ldionne added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Mar 14, 2024
@ldionne ldionne added this to the LLVM 18.X Release milestone Mar 14, 2024
@ldionne ldionne requested a review from a team as a code owner March 14, 2024 20:20
@llvmbot
Copy link
Collaborator

llvmbot commented Mar 14, 2024

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

Changes

This works around ODR violations in the clang-tidy plugin we use to perform the modules tests.

Fixes #85242


Full diff: https://github.com/llvm/llvm-project/pull/85305.diff

1 Files Affected:

  • (modified) libcxx/test/tools/clang_tidy_checks/CMakeLists.txt (+1-1)
diff --git a/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt b/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt
index 978e7095216522..a52140e2b9938a 100644
--- a/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt
+++ b/libcxx/test/tools/clang_tidy_checks/CMakeLists.txt
@@ -5,7 +5,7 @@
 set(LLVM_DIR_SAVE ${LLVM_DIR})
 set(Clang_DIR_SAVE ${Clang_DIR})
 
-find_package(Clang 18)
+find_package(Clang 18.1)
 if (NOT Clang_FOUND)
   find_package(Clang 17)
 endif()

Copy link
Member

@mordante mordante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tstellar due to the new LLVM version number scheme this code would mix LLVM 17 and LLVM 18. (LLVM 18.1 is not considered to be LLVM 18.) Since these are expected not to be ABI stable it seems we ran into ODR violations. For main I landed a different fix that has other improvements. These improvements should not be backported to LLVM-18. This is the minimal fix needed for LLVM-18.

LGTM!

@tstellar tstellar merged commit 3a06861 into llvm:release/18.x Mar 16, 2024
43 of 44 checks passed
@ldionne ldionne deleted the review/fix-clang-tidy-odr branch March 25, 2024 16:20
@pointhex pointhex mentioned this pull request May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
Development

Successfully merging this pull request may close these issues.

4 participants