[cfe-dev] [clang-tidy] problem with relative paths in compile_commands.json

support@goldencivet support at goldencivet.com
Sat Feb 21 10:15:43 PST 2015


> Yeah, I can reproduce this. I know little about clang-tidy and what the expected behavior is here - certainly crashing isn't ideal, but even beyond that I'm not sure if the assumption is taht all the paths in the compile commands database will be absolute, or relative to some specific place, etc.

In our painful experience (a) any invocation of ClangTool::run is likely to change current working directory behind our backs, so we wrap these in preservation and (b) all compile_commands paths must be absolute.

Thanks!



More information about the cfe-dev mailing list