Defer checking for mismatches between the deletedness of and overriding
authorRichard Smith <richard@metafoo.co.uk>
Wed, 11 Mar 2020 20:49:28 +0000 (13:49 -0700)
committerRichard Smith <richard@metafoo.co.uk>
Thu, 12 Mar 2020 20:07:22 +0000 (13:07 -0700)
commit9975dc38bf734b4d86eab61269080ca231379d23
treecf1217fa9a17bdf4e8b413af3aeaf50674cc418a
parent2a2d24201750117fca9db7aceff862ac6e16f2cf
Defer checking for mismatches between the deletedness of and overriding
function and an overridden function until we know whether the overriding
function is deleted.

We previously did these checks when we first built the declaration,
which was too soon in some cases. We now defer all these checks to the
end of the class.

Also add missing check that a consteval function cannot override a
non-consteval function and vice versa.
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaDeclCXX.cpp
clang/test/CXX/class.derived/class.abstract/p16.cpp
clang/test/CXX/special/class.dtor/p5-0x.cpp
clang/test/SemaCXX/PR9572.cpp
clang/test/SemaCXX/cxx0x-cursory-default-delete.cpp
clang/test/SemaCXX/cxx2a-consteval.cpp
clang/test/SemaCXX/virtual-base-used.cpp