c++: Improve error location for class using-decl.
authorJason Merrill <jason@redhat.com>
Sat, 7 Nov 2020 01:41:54 +0000 (20:41 -0500)
committerJason Merrill <jason@redhat.com>
Mon, 9 Nov 2020 20:16:38 +0000 (15:16 -0500)
commit05b03452db6a520091aed254d3c399caed714b15
tree282e4a45f1682c051cda8ed71b257c7564135375
parent38b17c27ce5a8e0cc5baa14697d4b5542b91b9d1
c++: Improve error location for class using-decl.

We should use the location of the using-declaration, not the location of the
class.

gcc/cp/ChangeLog:

* class.c (handle_using_decl): Add an iloc_sentinel.

gcc/testsuite/ChangeLog:

* g++.dg/lookup/using26.C: Adjust location.
* g++.old-deja/g++.other/using1.C: Adjust location.
gcc/cp/class.c
gcc/testsuite/g++.dg/lookup/using26.C
gcc/testsuite/g++.old-deja/g++.other/using1.C