[llvm-branch-commits] [libcxx] [libc++][modules] Increase clang-tidy version used. (PR #76268)

Mark de Wever via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Jan 5 10:07:54 PST 2024


mordante wrote:

> > Then I can prohibit clang-16 and clang-17.
> 
> Yeah, that's the solution. clang-tidy defines the same version macros as clang does, so prohibiting it from clang-16 is the same as prohibiting it for clang-tidy 16.

What makes it currently hard for modules is that in the current situation it would mean modules would have about 0% coverage. 

> > IMO The biggest issue is that the clang-tidy version is hard-coded in CMake. This is something I mentioned in the past too. If it was a CMake option it would be trivial to change the value without changing CMakeList.txt.
> 
> We could also extract the clang version used and search for a clang-tidy that fits this version. That would also avoid the matching problems for others. We would probably have to get a path to the corresponding clang-tidy too. I don't know whether that's trivially possible right now.

I think matching the version would be trivial for the additional libraries. For the executable it might be harder, but there we can let the user specify an executable and if specified test that version. Then we can issue a diagnostic when the versions don't match.



https://github.com/llvm/llvm-project/pull/76268


More information about the llvm-branch-commits mailing list