PR c++/91868 - improve -Wshadow location.
authorMarek Polacek <polacek@redhat.com>
Tue, 24 Sep 2019 14:40:24 +0000 (14:40 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Tue, 24 Sep 2019 14:40:24 +0000 (14:40 +0000)
commita0aedc7a41c6756a30669632d3df22e05b174401
tree97fccfffc60fafc496fb4cfb99831577a41d8df6
parentfea3397e56a3662a9b2361c14e427c9786042ebf
PR c++/91868 - improve -Wshadow location.

* name-lookup.c (check_local_shadow): Use DECL_SOURCE_LOCATION
instead of input_location.

* g++.dg/warn/Wshadow-16.C: New test.

From-SVN: r276103
gcc/cp/ChangeLog
gcc/cp/name-lookup.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wshadow-16.C [new file with mode: 0644]