[PATCH] D29806: [clang-tidy] Add -path option to clang-tidy-diff.py
Ehsan Akhgari via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 10 07:28:38 PST 2017
ehsan added a comment.
In https://reviews.llvm.org/D29806#673329, @alexfh wrote:
> What's your use case? Can it be addressed by just forwarding the -p flag to clang-tidy?
I just need to pass the full path to the compilation DB to clang-tidy. The problem is that invoking `clang-tidy-diff.py -- -p PATH` will run `clang-tidy -- -p PATH`, in order words adding -p to the compiler command line, not clang-tidy's.
> The script shouldn't know anything about implementation details of the compilation database being used (since it can be something other than JSON compilation database).
I copied the code to look for the DB verbatim from run-clang-tidy.py. I personally don't need the search logic, and just tried to keep this consistent with run-clang-tidy.py. I'd be happy to remove the search logic if you prefer that.
https://reviews.llvm.org/D29806
More information about the cfe-commits
mailing list