Extend the C++03 definition of POD to include defaulted functions
authorDavid Blaikie <dblaikie@gmail.com>
Sat, 5 Feb 2022 04:06:13 +0000 (20:06 -0800)
committerDavid Blaikie <dblaikie@gmail.com>
Wed, 26 Oct 2022 22:00:49 +0000 (22:00 +0000)
commit7846d590033e8d661198f4c00f56f46a4993c526
treebf049ccc2dc242e7c22290c6620c5e5d99ca16c4
parent9fc345c5c743335d8373bc5e56f3d5fb8fa0946f
Extend the C++03 definition of POD to include defaulted functions

The AST/conditionally-trivial-smfs tests look a bit questionable, but
are consistent with GCC's POD-ness, at least as far as packing is
concerned: https://godbolt.org/z/36nqPMbKM
(questionable because it looks like the type would be non-copyable, so
how could it be pod? But the calling convention/pass by value seems to
work correctly (local testing verifies that this behavior is preserved
even with this patch: https://godbolt.org/z/3Pa89zsv6 ))

Differential Revision: https://reviews.llvm.org/D119051
clang/include/clang/Basic/LangOptions.h
clang/include/clang/Basic/TargetInfo.h
clang/lib/AST/DeclCXX.cpp
clang/lib/Basic/TargetInfo.cpp
clang/lib/Basic/Targets/OSTargets.h
clang/test/AST/conditionally-trivial-smfs.cpp
clang/test/SemaCXX/class-layout.cpp