[clang] [CIR] Add support for delegating constructors (PR #143932)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 12 11:28:31 PDT 2025


================
@@ -267,23 +267,60 @@ class AggValueSlot {
   Address addr;
   clang::Qualifiers quals;
 
+  /// This is set to true if some external code is responsible for setting up a
+  /// destructor for the slot.  Otherwise the code which constructs it should
+  /// push the appropriate cleanup.
+  [[maybe_unused]] bool destructedFlag : 1;
----------------
erichkeane wrote:

So using 'bool' on a bitfield is problematic and won't pack on some ABIs.  These should all be `unsigned`.

Also, use `LLVM_PREFERRED_TYPE` to make it so diagnostics know they are bools.

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


More information about the cfe-commits mailing list