[PATCH] D54943: WIP [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness
Alexander Lanin via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 25 13:23:12 PDT 2020
AlexanderLanin added a comment.
"Minimal" example for the behavior I described before.
`clang++ -fsyntax-only ~/llvm/clang/test/SemaCXX/warn-range-loop-analysis.cpp -Wrange-loop-analysis 2>&1 | wc -l`
269
Then fix it by:
`~/llvm/build-const-fix/bin/clang-tidy ~/llvm/clang/test/SemaCXX/warn-range-loop-analysis.cpp -checks="-*,cppcoreguidelines-const-correctness" -fix`
And recount:
`clang++ -fsyntax-only ~/llvm/clang/test/SemaCXX/warn-range-loop-analysis.cpp -Wrange-loop-analysis 2>&1 | wc -l`
283
Yet again I want to mentioned that this is technically not a bug, but in combination with Werror it's not ideal. Basically I cannot compile my codebase after this fixit since Werror is set. Although the code is arguably better.
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