Open
Description
Hi,
In order to use gcc headers from our custom gcc installation we create llvm/bin/clang++.cfg
file with contents like [a] in it. This allows us to use clang++
without explicitly setting --gcc-toolchain
via command line. Looks like clang-tidy
does not respect llvm/bin/clang++.cfg
and fails with errors like [b].
clang-tidy
works if I pass --extra-arg="--gcc-toolchain=/path/to/custon/gcc"
. I tried creating llvm/bin/clang-tidy.cfg
hoping that clang-tidy
might read it but this did not work.
Is it on purpose that clang-tidy
does not respect clang++.cfg
file?
[a]
> cat bin/clang++.cfg
--gcc-toolchain=/path/el8_amd64_gcc12/external/gcc/12.3.1-40d504be6370b5a30e3947a6e575ca28
--target=x86_64-redhat-linux-gnu
[b]
Error while processing .../src/TestSubsystem/TestDQMAnalyzerStream/plugins/TestDQMAnalyzerStream.cc.
.../el8_amd64_gcc12/lcg/root/6.32.13-4719c3acec5bf7dbc47dbafce0eb285d/include/TString.h:39:12: error: 'compare' file not found [clang-diagnostic-error]
39 | # include <compare>