[PATCH] D24881: [clang-tidy] Cleaning up language options.

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 23 18:15:28 PDT 2016


xazax.hun added a comment.

In https://reviews.llvm.org/D24881#551487, @Eugene.Zelenko wrote:

> I think will be good idea to enable modernize-loop-convert, modernize-use-auto, modernize-use-default, modernize-use-nullptr only in C++11 mode.
>
> Probably modernize-avoid-bind code code be simplified too.


As far as I can see there is a discrepancy between these modernization checks. Loop convert, use auto, use default, use nullptr is registered for older standards deliberately.

See the following comment:

  // Only register the matchers for C++. Because this checker is used for
  // modernization, it is reasonable to run it on any C++ standard with the
  // assumption the user is trying to modernize their codebase.

So basically the question is: should we require the users to run the clang tidy in C++11 mode (hence change their build settings) to get these modernization checks?

I am okay with either of the answers but I wonder what do you think.


Repository:
  rL LLVM

https://reviews.llvm.org/D24881





More information about the cfe-commits mailing list