<div dir="ltr">Christian, it's suggested for the submitter to run clang-format before submitting a patch ("How to Submit a Patch") but there isn't any similar mention of clang-tidy. Yeah, a <span class="gmail_default" style="font-size:small">clang-tidy </span>recommendation should be added there but I needed something for out-of-tree.<br><br>Mehdi, it's possible (extremely likely) that a better understanding of the configuration/build machinery would allow someone to do this on the command line. I know instruction legalization with globalisel <span class="gmail_default" style="font-size:small">at this point, </span>but then I hadn't even heard of the compilation database until this week. I think build people and clang people have a better handle on this. Middle and backend people <span class="gmail_default" style="font-size:small">may </span>tend to consume what the defaults give them.<br><br>The build still has to be configured correctly and the -p switch needs the build directory location. Maybe clang-tidy itself could be improved to<span class="gmail_default" style="font-size:small"> add</span><br><br><span class="gmail_default" style="font-size:small">  1. </span>figuring out that you're in an LLVM tree<br><span class="gmail_default" style="font-size:small">  2. i</span><span class="gmail_default" style="font-size:small"></span>f so, finding build<br><span class="gmail_default" style="font-size:small">  3. </span>verifying the build<span class="gmail_default" style="font-size:small"> </span>configuration<br><span class="gmail_default" style="font-size:small">  4. </span>basically doing what tidy-llvm does<br><br>Then you could type clang-tidy llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp or even clang-tidy AsmPrinter.cpp<br>I'm happy I got my tidying done and I just wanted to make clang-tidy a more approachable tool.<br><br>Chris</div>