[llvm-bugs] [Bug 40858] New: Warn when shadowing a member variable in a structured binding

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Feb 26 00:12:42 PST 2019


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: unassignedclangbugs at nondot.org
          Reporter: llvm at mrks.info
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190226/58b70890/attachment.html>


More information about the llvm-bugs mailing list