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

Florin Iucha via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 11 19:47:18 PST 2020


0x8000-0000 added a comment.

I have built diff14 and tried to apply it on an internal code base with ~7500 translation units.

  $ python3 /opt/clang10/share/clang/run-clang-tidy.py -clang-tidy-binary  /opt/clang10/bin/clang-tidy -clang-apply-replacements /opt/clang10/bin/clang-apply-replacements -p ../build.clang10.dbg/ "-checks=-*,cppcoreguidelines-const-correctness"  -fix -j 24 -quiet -deduplicate $(find lib -name \*.cpp) > const_fix.log 2&> const_err.log

The diffstat is

  1608 files changed, 19927 insertions(+), 19927 deletions(-)

This generated 56 "const const" declarations, of which 25 were triple const!

I have tried -deduplicate argument as in Jonas' script, but ...

  run-clang-tidy.py: error: unrecognized arguments: -deduplicate

Now onto editing those files by hand to remove the duplications and re-running the build.


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