aaron.ballman added a comment.
Hmmm, is this effectively `std::has_unique_object_representations` (ensuring
that all bits of the object representation contribute to the value)?
================
Comment at: clang/lib/AST/Type.cpp:2610
+
+ if (const auto *RecordDecl = CanonicalType->getAsCXXRecordDecl()) {
+ if (!RecordDecl->isStandardLayout() || RecordDecl->isUnion())
----------------
Dependent types should probably return `false`?
================
Comment at: clang/lib/AST/Type.cpp:2640
+
+ return false;
+}
----------------
I think this might be missing cases, like complex integers, scoped
enumerations, vector types?, pointer types, atomic versions of these types...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147175/new/
https://reviews.llvm.org/D147175
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits