[cmake-developers] Integration of clang-tidy

Daniel Pfeifer daniel at pfeifer-mail.de
Wed Apr 27 18:48:15 EDT 2016


On Wed, Apr 27, 2016 at 3:10 PM, Brad King <brad.king at kitware.com> wrote:
> On 04/26/2016 05:32 PM, Daniel Pfeifer wrote:
>> This is a follow up patch:
>
> Thanks.
>
>> -        tidy_cmd.insert(tidy_cmd.end(), orig_cmd.begin()+1, orig_cmd.end());
>> +        tidy_cmd.insert(tidy_cmd.end(), orig_cmd.begin(), orig_cmd.end());
>
> What is the purpose of this hunk?  Does clang-tidy expect to be
> given the full compiler command line including "cc"?  This does
> not look related to the change described in the commit message.

It is unrelated. Clang-Tidy picks the interesting pieces from the
compiler command line and ignores the rest. Whether cc is given or not
makes no difference.
But maybe we should leave the decision what to pick to Clang-Tidy? It
may be clearer to forward the original command line unmodified.


More information about the cmake-developers mailing list