I have a CMake project where i try to run clang-tidy checks and fixes during the build. Everything works with clang-tidy from llvm 12.0.1(also tried 11.0.0) installed with brew.
When i try to use the clang-tidy(11.0.0 and 12.0.0 from Qt Creator 5.0.0 beta) shipped with Qt Creator so the people using the project doesn't have to install it, i get the error:
licensing.h:3:10: error: 'string' file not found [clang-diagnostic-error]
#include <string>
^
the CMakeLists.txt part looks like this:
set(CMAKE_CXX_CLANG_TIDY
${CLANG_TIDY_BIN}
--format-style=file
--header-filter
--config=
--fix
)