diff options
author | Jason Merrill <jason@redhat.com> | 2022-03-31 16:18:58 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2022-05-02 15:52:23 -0400 |
commit | dcb4bd0789d13dd4d07428bff712d01d3ea71ebe (patch) | |
tree | 4a9e2c4fe3ce95215ddca92f77ec9122c97e46a6 /libgcc | |
parent | 7e1f30d7edd433ca0fc28ae9ac1ce9b522790baf (diff) | |
download | gcc-dcb4bd0789d13dd4d07428bff712d01d3ea71ebe.zip gcc-dcb4bd0789d13dd4d07428bff712d01d3ea71ebe.tar.gz gcc-dcb4bd0789d13dd4d07428bff712d01d3ea71ebe.tar.bz2 |
c++: also note name used in enclosing class
While looking at PR96645 I noticed that while we were diagnosing names
changing meaning in the full class context, we weren't doing this for
lookups in nested class bodies.
Note that this breaks current range-v3; I've submitted a pull request to fix
its violation of the rule.
gcc/cp/ChangeLog:
* class.cc (maybe_note_name_used_in_class): Note in all enclosing
classes. Remember location of use.
(note_name_declared_in_class): Adjust.
gcc/testsuite/ChangeLog:
* g++.dg/lookup/name-clash13.C: New test.
* g++.dg/lookup/name-clash14.C: New test.
* g++.dg/lookup/name-clash15.C: New test.
* g++.dg/lookup/name-clash16.C: New test.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions