[PATCH] D119051: Extend the C++03 definition of POD to include defaulted functions

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 4 14:41:38 PDT 2022


rnk added a comment.

Relatedly, if we put this POD behavior query on TargetInfo, I wonder if it makes sense to move the tail padding predicate from TargetCXXABI to TargetInfo:
https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Basic/TargetCXXABI.h#L282

The switch there is basically a switch over architectures.



================
Comment at: clang/lib/AST/DeclCXX.cpp:774-775
+        if ((!Constructor->isDeleted() && !Constructor->isDefaulted()) ||
+            (getLangOpts().getClangABICompat() <=
+             LangOptions::ClangABI::Ver15 || Target.isPS() || Target.isOSDarwin())) {
+          // C++ [class]p4:
----------------
I think this ought to be factored into a TargetInfo method, so we can share the logic here and below somehow. Compare this for example with `TargetInfo::getCallingConvKind`, which has a similar purpose.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119051/new/

https://reviews.llvm.org/D119051



More information about the cfe-commits mailing list