[PATCH] D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness
Florin Iucha via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 12 09:44:40 PST 2020
0x8000-0000 added a comment.
In D54943#1815916 <https://reviews.llvm.org/D54943#1815916>, @Eugene.Zelenko wrote:
> In D54943#1815912 <https://reviews.llvm.org/D54943#1815912>, @0x8000-0000 wrote:
>
> > As an aside, once this is merged in, I dream of a "fix-it" for old style C code:
> >
> > int foo;
> >
> > ...
> > /* page of code which does not use either foo or bar */
> > ...
> > foo = 5;
> >
> >
> > Moves the foo declaration to the line where it is actually first initialized. Then run the constify tool on top.
>
>
> You are not first :-) See PR21983.
There's https://reviews.llvm.org/D64671 which solves half the problem.
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