<div dir="ltr">I have managed to build a release version of clang-tidy on my Mac, and checked that it is optimized with --version.<div><br></div><div>~/llvm-build/bin/clang-tidy --version<br></div><div><div>LLVM (<a href="http://llvm.org/">http://llvm.org/</a>):</div><div>LLVM version 3.8.0svn</div><div>Optimized build.</div><div>Built Jan 15 2016 (13:18:26).</div><div>Default target: x86_64-apple-darwin15.0.0</div><div>Host CPU: broadwell</div></div><div><br></div><div><br></div><div>I am working with an Objective-C project in Xcode, and have managed to generate the required compile_commands.json file using xcodebuild/xcpretty, and am able to run it.</div><div><br></div><div>When I run it on a single file that has 2700 lines with just the compile_commands.json file (stripped down to just one command), it takes clang-tidy around 23 seconds to complete.</div><div><br></div><div>~/llvm-build/bin/clang-tidy MyFile.m</div><div><div>...</div><div>Suppressed 719 warnings (719 in non-user code).</div><div>Use -header-filter=.* to display errors from all non-system headers.</div></div><div><br></div><div>If I run the same command with "--", then it is much faster.</div><div><div>~/llvm-build/bin/clang-tidy MyFile.m --</div><div>...</div></div><div><div>Suppressed 6 warnings (6 in non-user code).</div><div>Use -header-filter=.* to display errors from all non-system headers.</div></div><div><br></div><div><br></div><div><br></div><div>It seems the difference is that with --, some header files aren't processed? If I am just interested in errors in the specific file I am running on, is using -- the right thing to do?</div><div><br></div><div>Thanks,</div><div>Hongping</div><div><br></div></div>