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

Stephen Kelly via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 9 12:56:51 PDT 2021


steveire added a comment.

In D69764#2867109 <https://reviews.llvm.org/D69764#2867109>, @MyDeveloperDay wrote:

> In D69764#2863648 <https://reviews.llvm.org/D69764#2863648>, @owenpan wrote:
>
>> Has this been tested against a large code base? It also needs an unqualified LGTM before it can be merged.
>
> D105701: [clang-format] test revision (NOT FOR COMMIT) to demonstrate east/west const fixer capability <https://reviews.llvm.org/D105701> demonstrates transforming clang-format itself to east const.
>
> Actually transformation of the whole of the clang subfolder is actually holding up pretty well. I'm not seeing an violations (not sure if I transformed all the files) but certainly so much so that creating a review that covered all of it was way too big.
>
> Testing on a large code base can be hard especially one as large as LLVM where its not currently fully clang-formatted in the first place.
>
> Of course the lit tests get mangled as the test code gets swapped but the //CHECK-FIXES doesn't
>
> Like I mentioned before, by gut feeling is that this option is MOST useful in preventing violation to your current style from creeping in than going to the extreme of transforming a whole project from east to west or vice versa.

FYI - I also tested this on a large codebase at work. It is now used to keep the current style as you describe.

Should any known failure modes be documented?


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

https://reviews.llvm.org/D69764



More information about the cfe-commits mailing list