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

            Bug ID: 28676
           Summary: -Wshadow doesn't warn on shadowed 'using' statements.
                     Gcc does.
           Product: clang
           Version: 3.8
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangb...@nondot.org
          Reporter: xax...@gmail.com
                CC: dgre...@apple.com, llvm-bugs@lists.llvm.org
    Classification: Unclassified

using Foo=int; 
int i;
int main(){
  using Foo=char; // <== clang doesn't warn about this, gcc does
  int i;
}

gcc catches both:  https://godbolt.org/g/6heXBO

clang 3.8 doesn't warn on the shadowed 'using': https://godbolt.org/g/zTgIDn

Tested with every version of clang on godbolt down to 3.3 (lower was broken)
and got the same behavior on each version of clang.

gcc seems to catch both on every version that supports c++11.

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

Reply via email to