[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 31 15:32:17 PDT 2024


================
@@ -160,6 +160,9 @@ Bug Fixes in This Version
 Bug Fixes to Compiler Builtins
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
+- ``__is_layout_compatible`` no longer requires the empty bases to be the same in two
+  standard-layout classes. It now only compares non-static data members.
----------------
Endilll wrote:

That is correct, but the feature made into the 19 branch, whereas this fix did not (I hope we can backport it), hence a release note.

https://github.com/llvm/llvm-project/pull/92103


More information about the cfe-commits mailing list