[llvm-bugs] [Bug 28676] New: -Wshadow doesn't warn on shadowed 'using' statements. Gcc does.
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Jul 22 22:44:47 PDT 2016
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: unassignedclangbugs at nondot.org
Reporter: xaxxon at gmail.com
CC: dgregor at apple.com, llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160723/61e60fc6/attachment.html>
More information about the llvm-bugs
mailing list