name-lookup.c (check_extern_c_conflict): Use DECL_SOURCE_LOCATION.
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 25 Sep 2019 08:50:29 +0000 (08:50 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 25 Sep 2019 08:50:29 +0000 (08:50 +0000)
commita4cd9ac5f05bd0a6f73b1ec70fce841990ada959
tree6dbc3c7d2cca70f1ad84e10d2c248125c4894256
parent1ed0d9f8ded4cfcff1c0409b183c5b64f69200be
name-lookup.c (check_extern_c_conflict): Use DECL_SOURCE_LOCATION.

/cp
2019-09-25  Paolo Carlini  <paolo.carlini@oracle.com>

* name-lookup.c (check_extern_c_conflict): Use DECL_SOURCE_LOCATION.
(check_local_shadow): Use it in three additional places.

/testsuite
2019-09-25  Paolo Carlini  <paolo.carlini@oracle.com>

* g++.dg/diagnostic/redeclaration-1.C: New.
* g++.dg/lookup/extern-c-hidden.C: Test location(s) too.
* g++.dg/lookup/extern-c-redecl.C: Likewise.
* g++.dg/lookup/extern-c-redecl6.C: Likewise.
* g++.old-deja/g++.other/using9.C: Likewise.

From-SVN: r276119
gcc/cp/ChangeLog
gcc/cp/name-lookup.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/diagnostic/redeclaration-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/lookup/extern-c-hidden.C
gcc/testsuite/g++.dg/lookup/extern-c-redecl.C
gcc/testsuite/g++.dg/lookup/extern-c-redecl6.C
gcc/testsuite/g++.old-deja/g++.other/using9.C