[SemaCXX] Validate destructor is valid for dependent classes
authorRoy Jacobson <roi.jacobson1@gmail.com>
Mon, 1 Aug 2022 20:47:30 +0000 (23:47 +0300)
committerRoy Jacobson <roi.jacobson1@gmail.com>
Tue, 2 Aug 2022 18:50:54 +0000 (21:50 +0300)
commit508c431ed9ab6d2074f1c68e3ee6b245ece57d5a
tree51c4290415c76762b63653d91fa13202507630fa
parent92c1bc61586c9d6c7bf0c36b1005fe00b4f48cc0
[SemaCXX] Validate destructor is valid for dependent classes

We didn't check that a destructor's name matches the directly enclosing class if the class was dependent.
I enabled the check we already had for non-dependent types, which seems to work. Added appropriate tests.

Fixes GitHub issue #56772

Reviewed By: erichkeane

Differential Revision: https://reviews.llvm.org/D130936
clang/docs/ReleaseNotes.rst
clang/lib/Sema/SemaDecl.cpp
clang/test/SemaCXX/member-class-11.cpp