[PATCH] D45444: [clang-tidy] implement new check for const-correctness
Florin Iucha via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 2 15:44:08 PST 2019
0x8000-0000 added a comment.
Thank you for rebasing on current master.
I have ran it today on our code base and found three classes of false positives:
1. Writing to a bitfield of a struct. The struct still is suggested it should be const.
2. Using a variable with an ostream extraction; like "int foo; cin >> foo;", except it was a template on the stream instance.
3. In a for loop, with a somewhat strange pair (for auto [foo, bar] = std::pair {}; foo < big_foo; ++ foo).
Let me know if you can't create test cases from these descriptions and I can try to extract the code.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D45444/new/
https://reviews.llvm.org/D45444
More information about the cfe-commits
mailing list