[PATCH] D73007: [Sema] Avoid Wrange-loop-analysis false positives
Mark de Wever via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 21 11:55:39 PST 2020
Mordante marked 2 inline comments as done.
Mordante added inline comments.
================
Comment at: clang/lib/Sema/SemaStmt.cpp:2703-2704
// suggest the const reference type that would do so.
// For instance, given "for (const &Foo : Range)", suggest
// "for (const Foo : Range)" to denote a copy is made for the loop. If
// possible, also suggest "for (const &Bar : Range)" if this type prevents
----------------
aaronpuchert wrote:
> That's the part the bothers me.
I think we shouldn't remove the warning, it is useful. We can consider to move this out of -Wall, but I first like to hear the opinion of the other reviewers in this matter. If we want this change I'll be happy to create a new patch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73007/new/
https://reviews.llvm.org/D73007
More information about the cfe-commits
mailing list