[clang] Implement [[msvc::no_unique_address]] (PR #65675)

Christopher Di Bella via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 12 11:39:33 PDT 2023


================
@@ -2999,17 +3139,17 @@ void MicrosoftRecordLayoutBuilder::layoutBitField(const FieldDecl *FD) {
     auto NewSize = Context.toCharUnitsFromBits(
         llvm::alignDown(FieldBitOffset, Context.toBits(Info.Alignment)) +
         Context.toBits(Info.Size));
-    Size = std::max(Size, NewSize);
+    DataSize = Size = std::max(Size, NewSize);
----------------
cjdb wrote:

I'd prefer it if we didn't have cascading assignment please.

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


More information about the cfe-commits mailing list