https://bugs.llvm.org/show_bug.cgi?id=40858

            Bug ID: 40858
           Summary: Warn when shadowing a member variable in a structured
                    binding
           Product: clang
           Version: trunk
          Hardware: Macintosh
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++'17
          Assignee: unassignedclangb...@nondot.org
          Reporter: l...@mrks.info
                CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
                    llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk

With -Wshadow-all, this should cause a warning (and does in GCC):

struct S {
    int i = 1;

    void v() {
        const auto& [i] = std::tuple<int>{2};
    }
};

https://godbolt.org/z/PDVZK1

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to