HomePhabricator

[Sema] Reword warning for constant captures that are not required

Description

[Sema] Reword warning for constant captures that are not required

This is one of the darker corners of C++, make it clear that this is
about constants and rephrase it a bit.

Before: lambda capture 'i' is not required to be captured for this use
After: lambda capture of constant 'i' is not required for this use

Details

Committed
d0kJul 16 2018, 2:52 AM
Parents
rL337151: [Analyzer] Mark `SymbolData` parts of iterator position as live in program…
Branches
Unknown
Tags
Unknown

Event Timeline

cpplearner added inline comments.
/cfe/trunk/test/SemaCXX/warn-unused-lambda-capture.cpp
44

Hmm, i is not actually const here. Are you sure that the warning makes things more clear?