error: ‘***’ file not found [clang-diagnostic-error] 需要指定编译环境 解决方法:在尾部加-- -x c++来指定c++编译器(默认应该是gcc) clang-tidy --checks='*' test.h -- -x c++ 1 如果是找不到其他目录下的头文件 解决方法:添加头文件所在目录 -I thirdparty/op