[cfe-dev] Warning for unused lambda captures

Malcolm Parsons via cfe-dev cfe-dev at lists.llvm.org
Fri Dec 16 12:27:20 PST 2016


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.

-- 
Malcolm Parsons



More information about the cfe-dev mailing list