[clang] Add ElaboratedType sugaring for types on implicit special members
authorBrad King <brad.king@kitware.com>
Fri, 20 Jan 2023 23:29:11 +0000 (15:29 -0800)
committerRichard Smith <richard@metafoo.co.uk>
Fri, 20 Jan 2023 23:51:32 +0000 (15:51 -0800)
commit028d13b15612385202ad79269f011e3f1ecf0a25
tree700d2bd4165ff5ed837716aeababe1a265c13fe9
parent86b47f143853ec1b847e8a4ce0d234b577cfb502
[clang] Add ElaboratedType sugaring for types on implicit special members

Extend the change from commit 15f3cd6bfc67 ([clang] Implement
ElaboratedType sugaring for types written bare, 2021-10-11, D112374)
to cover types in the signatures of implicit copy-constructor,
copy-assignment, move-constructor, and move-assignment members in
C++ record types.

With this fix, diagnostic messages print types of special members
consistently whether they are explicitly or implicitly defined.

Fixes: https://github.com/llvm/llvm-project/issues/59557

Reviewed By: rsmith

Differential Revision: https://reviews.llvm.org/D141441
14 files changed:
clang/lib/Sema/SemaDeclCXX.cpp
clang/test/AST/ast-dump-decl.cpp
clang/test/AST/ast-dump-expr-json.cpp
clang/test/Analysis/auto-obj-dtors-cfg-output.cpp
clang/test/Analysis/lifetime-cfg-output.cpp
clang/test/Analysis/missing-bind-temporary.cpp
clang/test/Analysis/scopes-cfg-output.cpp
clang/test/CXX/basic/basic.lookup/basic.lookup.argdep/p4.cpp
clang/test/CXX/dcl.decl/dcl.meaning/dcl.fct/dcl.fct.def.default/p2.cpp
clang/test/Index/print-type.cpp
clang/test/Misc/diag-template-diffing.cpp
clang/test/SemaCXX/conversion-function.cpp
clang/test/SemaCXX/cxx11-call-to-deleted-constructor.cpp
clang/test/SemaCXX/deduced-return-type-cxx14.cpp