http://llvm.org/bugs/show_bug.cgi?id=21110

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |[email protected]
          Component|C++                         |C++1y
         Resolution|DUPLICATE                   |---
            Summary|Stop -Wshadow from catching |Warn on possibly unintended
                   |obviously intended          |non-shadowing in lambda
                   |shadowing                   |init-capture

--- Comment #2 from [email protected] ---
(In reply to comment #1)
This part doesn't seem to be covered by bug 16088, though:

>Of course there are times when the a lambda's captures' shadowing might be 
>>problematic and a warning could be appropriate:
>
>    int i, j;
>    [&i = j] { // use i...? }

Here clang could generate a warning that the init-capture "i" is initialized
with local variable "j" when most likely be local variable "i" should be used.
I.e. warn because the init-capture "i" *does not* shadow local variable "i".

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to