[PATCH] D71857: [NFC] Fixes -Wrange-loop-analysis warnings
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 1 15:43:28 PST 2020
MaskRay added a comment.
I really like the new feature. Thanks for making the efforts!
However, I am afraid I don't like some of the fixes here. You can replace `const auto` with `const auto &` and call that a fix... IMHO if the type is not obvious, `const ConcreteType &` will be better.
In addition, I think there are some false positives, e.g. the diagnostic may ask me to replace `const std::pair<T *, size_t>` with `const std::pair<T *, size_t> &` when it is clear that the type is trivial and cheap to copy.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71857/new/
https://reviews.llvm.org/D71857
More information about the cfe-commits
mailing list