Bug: It seems like @responseFiles should work after -- and not just before the -- when --extra-arg are added, since replacing the @responseFile with the -I contents works (after the --). If there's a reason it can't, it would be nice if additional documentation could be added at https://releases.llvm.org/14.0.0/tools/clang/tools/extra/docs/clang-tidy/ (or equivalent for clang 15) explaining the difference between --extra-arg and -- for this case or others if they exist.
Response files are required on Windows when the command line length limit is exceeded (i.e. due to too many -I, which commonly repros with Unreal Engine projects, although in most scenarios -p would be used instead of --).
With clang 14.0.3 on Windows using
test.cpp
test.rsp
This works:
"C:\Program Files\LLVM\bin\clang.exe" "<path>/test.cpp" @<path>/test.rsp
This does not:
"C:\Program Files\LLVM\bin\clang-tidy.exe" "<path>/test.cpp" -- @<path>/test.rsp
But using a modified test2.rsp with --extra-arg added to each individual entry works:
"C:\Program Files\LLVM\bin\clang-tidy.exe" "<path>/test.cpp" @<path>/test2.rsp --
Bug: It seems like @responseFiles should work after -- and not just before the -- when --extra-arg are added, since replacing the @responseFile with the
-I
contents works (after the --). If there's a reason it can't, it would be nice if additional documentation could be added at https://releases.llvm.org/14.0.0/tools/clang/tools/extra/docs/clang-tidy/ (or equivalent for clang 15) explaining the difference between --extra-arg and--
for this case or others if they exist.Response files are required on Windows when the command line length limit is exceeded (i.e. due to too many -I, which commonly repros with Unreal Engine projects, although in most scenarios
-p
would be used instead of--
).