[PATCH] D54943: WIP [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

Florin Iucha via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 8 05:44:57 PDT 2021


0x8000-0000 added a comment.

In D54943#2933179 <https://reviews.llvm.org/D54943#2933179>, @JonasToth wrote:

> In D54943#2633408 <https://reviews.llvm.org/D54943#2633408>, @tiagoma wrote:
>
>> Can we get this in? I work in Microsoft Office and we have been using this checker and it works great! There are a couple of issues with it and I would like to contribute fixes.
>
> YES. I WILL WORK ON THIS NOW.

Great news Jonas! Thank you!

> After soooo much time has passed I think i have finally time again to bring this check over the line. I will invest at least every sunday from now on, until its done :)
>
> This is my initial work-list I would like to fix before this check can be merged:
>
> - rebase to current master (obviously)
> - fix `clang-apply-replacements` duplication that comes from fixes in templates (multiple instantiations create `const`-fix at the same position. but because the warning message contains different type names,  they are not deduplicated)
> - go through the review again and check if there are missing comments to address
> - improve the documentation and give some hints on possible issues

These all seem to handle the fix-it portion. Would it be possible to split that into a follow-up review?

I am using tidy from CI and as a 'live-linter' from [n]vim. If I get a warning, it's easy to go to the line and type the six characters. In fact I don't even know the keystroke sequence that would instruct the editor to apply a fix-it :)

Obviously fix-its are not helping in CI, either - what is important is reporting at least one location and then the review gets rejected and subsequently revised.

I'm not saying I won't ever use the fix-its, but for now detection and reporting cover 100% of my use cases.

Thank you again for getting the energy and the time to work on this!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D54943



More information about the cfe-commits mailing list