[clang] [Clang] Explain why is_standard_layout evaluated to false (PR #143722)
Samarth Narang via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 12 06:14:00 PDT 2025
snarang181 wrote:
> Thanks a lot for working on that.
>
> Can you add tests for all of these examples? https://eel.is/c++draft/class.prop#11
>
> In particular
>
> * If there are multiple direct base classes, a type is not a standard layout
> * If in the inheritance hierarchy, there are multiple classes with members, it is not _standard-layout_.
> We have `CXXRecordDecl::hasDirectFields()` and `CXXRecordDecl::getStandardLayoutBaseWithFields` that should help
@cor3ntin, I added more inheritance related tests. Kindly review, thanks!
https://github.com/llvm/llvm-project/pull/143722
More information about the cfe-commits
mailing list