[llvm-bugs] [Bug 39428] New: lambda capture shadowing is not rejected

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Oct 25 03:36:54 PDT 2018


            Bug ID: 39428
           Summary: lambda capture shadowing is not rejected
           Product: clang
           Version: 7.0
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: trass3r at gmail.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org


void f() {
  int x = 0;
  auto g = [x](int x) { return 0; }

should be an error:

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181025/5ecf35db/attachment.html>

More information about the llvm-bugs mailing list