[clang] [Clang] Implement diagnostics for why `std::is_standard_layout` is false (PR #144161)

Corentin Jabot via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 25 05:26:39 PDT 2025


================
@@ -644,6 +644,11 @@ Improvements to Clang's diagnostics
   #GH69470, #GH59391, #GH58172, #GH46215, #GH45915, #GH45891, #GH44490,
   #GH36703, #GH32903, #GH23312, #GH69874.
 
+- Enhanced `__is_standard_layout` and `std::is_standard_layout` diagnostics to
+  provide more detailed information about why a type is not standard layout.
+  This includes information about the presence of non-standard layout members,
+  such as virtual functions, non-standard alignment, or non-standard base classes.
+
----------------
cor3ntin wrote:

We haven't added a diagnostics to previous change, so  I would revert this.
Instead, we should add an entry for the whole feature.

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


More information about the cfe-commits mailing list