[PATCH] Add -Wrange-loop-analysis to warn when a range-based for-loop is creating a copy.
David Blaikie
dblaikie at gmail.com
Fri Feb 27 15:00:11 PST 2015
On Fri, Feb 27, 2015 at 2:54 PM, Richard Trieu <rtrieu at google.com> wrote:
> In http://reviews.llvm.org/D4169#131597, @dblaikie wrote:
>
> > In http://reviews.llvm.org/D4169#68650, @dblaikie wrote:
> >
> > > You could probably be a bit narrower than POD types - probably just
> > > types with trivial copy constructors. But for now "all POD types"
> > > shouldn't have any false positives, only false negatives - so perhaps
> > > leave it that way with a FIXME Describing a narrower check for small
> > > types (small to be defined/discovered) with trivial copy construction.
> >
> >
> > Have you addressed these suggestions?
> >
> > I don't recall where this was all left, exactly.
>
>
> Currently, all POD types for copies are ignored. There is a comment to
> only ignore types with trivial constructors and to figure out a proper size
> for small in a future revision.
>
OK - do you have numbers (true/false positive rates, etc) for the warning
as it stands in this review?
>
>
> http://reviews.llvm.org/D4169
>
> EMAIL PREFERENCES
> http://reviews.llvm.org/settings/panel/emailpreferences/
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150227/60987ac9/attachment.html>
More information about the cfe-commits
mailing list