[PATCH] D69764: [clang-format] Add East/West Const fixer capability

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 13 10:21:43 PDT 2021


MyDeveloperDay added a comment.

> FWIW, if you use the compile commands database, the only thing you need to do on the command line is specify the checks to enable or disable.

The project I work on doesn't have/use compile commands databases? if you are make based system or some other legacy build system you just may not have this, so I don't want to limit the uses to just those projects that do.

I honestly don't deny that a const fixer could be added to clang-tidy and that would be great, but for the same reason that I think that the braces-around-statements clang-tidy check isn't necessarily the only way to work.

I've used braces-around-statements in clang-tidy and trying to run that repeated over a very large project is painful.

You asked for both fast and correct, lets me honest clang-tidy can very often neither of those things and whilst is can be made correct, really is always going to struggle being fast. This turns a subsecond reformatting (that may need to do nothing) into a multi minute build, and whilst I love it for what is can do, for some of these simple tasks of which the expectation is to do almost nothing, its a massive overkill.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69764/new/

https://reviews.llvm.org/D69764



More information about the cfe-commits mailing list