[cfe-dev] Warning for unused lambda captures
Piotr Padlewski via cfe-dev
cfe-dev at lists.llvm.org
Sat Dec 17 04:32:45 PST 2016
Yep, good idea.
2016-12-16 23:00 GMT+01:00 Jonathan Coe via cfe-dev <cfe-dev at lists.llvm.org>
:
>
>
> > On 16 Dec 2016, at 20:29, Aaron Ballman via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
> >
> > On Fri, Dec 16, 2016 at 3:27 PM, Malcolm Parsons
> > <malcolm.parsons at gmail.com> wrote:
> >> On 16 December 2016 at 16:14, Aaron Ballman <aaron at aaronballman.com>
> wrote:
> >>> I think this could be a useful warning for explicit captures. It seems
> >>> possible that someone may want to capture something by value purely
> >>> for its RAII properties, but that seems unlikely to be common and
> >>> could still be silenced with an explicit cast to void?
> >>
> >> It looks like -Wunused-private-field checks
> >> InitializationHasSideEffects(FieldDecl&) to avoid warning about such
> >> fields.
> >
> > Perfect! I figured we already had a solution for it, I just wanted to
> > point it out as a possible false-positive to avoid. I think it's a
> > great idea for a diagnostic in Clang.
> >
>
> Sounds like a great idea. I'd be keen to use this check and happy to
> review a patch.
>
> > ~Aaron
> >
> >>
> >> --
> >> Malcolm Parsons
> > _______________________________________________
> > cfe-dev mailing list
> > cfe-dev at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20161217/fc95a4c7/attachment.html>
More information about the cfe-dev
mailing list