This is an archive of the discontinued LLVM Phabricator instance.

[libc++][test] Prefers the newer clang-tidy version.
ClosedPublic

Authored by Mordante on Apr 28 2023, 8:41 AM.

Details

Reviewers
ldionne
Group Reviewers
Restricted Project
Commits
rGcf64668b8c41: [libc++][test] Prefers the newer clang-tidy version.
Summary

Module require Clang 17, since Clang 16 requires the magic # FILE
line. Therefore, if available, use clang-tidy 17 too. This change should
be reverted after LLVM 17 is released.

Diff Detail

Event Timeline

Mordante created this revision.Apr 28 2023, 8:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 28 2023, 8:41 AM
Mordante requested review of this revision.Apr 28 2023, 8:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 28 2023, 8:41 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Mordante updated this revision to Diff 518294.Apr 30 2023, 4:21 AM

Trigger CI.

Mordante updated this revision to Diff 526320.May 28 2023, 3:24 AM

Adds an extra test.
Rebased on top of D151223.

ldionne accepted this revision.May 30 2023, 9:03 AM
ldionne added a subscriber: ldionne.

I just spoke to Mark and he explained that this was necessary for the C++20 Modules work.

This is not policy-setting like in https://discourse.llvm.org/t/frc-versions-of-libc-clang-format-and-clang-tidy-dependencies/70953, this patch is basically a one-off required to unblock the modules work. If we end up deciding to use ToT clang-tidy after the RFC, then this patch would become permanent and not just a temporary workaround. Otherwise, it's just a temporary workaround since we require some recent clang-tidy features.

In light of this, I am OK with this patch but I do expect that after we land LLVM 17, we'll update the code base to reflect the consensus gained in the RFC (which might mean basically reverting this patch).

libcxx/test/tools/clang_tidy_checks/CMakeLists.txt
8–12
This revision is now accepted and ready to land.May 30 2023, 9:03 AM
Mordante marked an inline comment as done.May 31 2023, 8:24 AM
This revision was automatically updated to reflect the committed changes.