[PATCH] D23279: clang-reorder-fields
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 9 09:25:38 PDT 2016
On Tue, Aug 9, 2016 at 12:14 PM, Kirill Bobyrev
<kbobyrev.opensource at gmail.com> wrote:
> omtcyfz added a comment.
>
> In https://reviews.llvm.org/D23279#510011, @aaron.ballman wrote:
>
>> In https://reviews.llvm.org/D23279#510002, @omtcyfz wrote:
>>
>> > In https://reviews.llvm.org/D23279#509896, @compnerd wrote:
>> >
>> > > If the argument really is that we want to minimize the tools then Id argue that `clang-rename` also belongs in `clang-tidy` as it would be used to rename fields to match the naming convention (tidying up your code base).
>> >
>> >
>> > It does not belong to `clang-tidy`. `clang-tidy` is a linter, it is meant for diagnosing and fixing typical programming errors.
>>
>>
>> We have the modernize and readability modules which don't really deal with programming errors at all (for some definition of programming error).
>
>
> All of the checks in `clang-tidy` **issues**. These are also issues:
>
> - code style violations
> - inefficiency
>
> And other things.
>
> There is a clear difference between fixing issues and refactoring. `clang-format` does refactoring, `clang-tidy` deals with issues.
Consider modernize-loop-convert, modernize-raw-string-literal, and
modernize-use-override. These are most definitely refactoring tools
that exist within clang-tidy and they do not point out issues with the
user's code. That being said, I'm opposed to the proliferation of
stand-alone tools when possible. clang-format does not strike me as a
good home for the proposed functionality because reformatting does not
suggest semantic modifications to the user's source code, and it
certainly would not be the first tool I would think to reach for to
get this functionality. I think clang-tidy is a more reasonable tool
for it. Ideally, we would have a refactoring module that houses most
(if not all) of modernize's functionality + refactoring passes that
are not really modernizations (such as the recent review of converting
memcpy() -> std::copy()).
>
>
> Repository:
> rL LLVM
>
> https://reviews.llvm.org/D23279
>
>
>
More information about the cfe-commits
mailing list