[PATCH] D45306: PR36992 don't overwrite virtual bases in tail padding

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 5 12:12:59 PDT 2018


rjmccall added a comment.

Changing the requirements on the return-value slot would be an ABI break, no?  And it would force to us to treat all complete-object constructions as nvsize-limited unless they're constructions of known sizeof-sized allocations.



================
Comment at: CodeGen/CGDecl.cpp:1462
+                                              AggValueSlot::IsNotAliased,
+                                              AggValueSlot::DoesNotOverlap));
     }
----------------
How is 'does not overlap' justified here?  Should this be propagated into the LValue?


================
Comment at: CodeGen/CGExprAgg.cpp:1721
+      TypeInfo = getContext().getTypeInfoInChars(BaseEltTy);
+      // FIXME: What about VLAs of VLAs?
       assert(!TypeInfo.first.isZero());
----------------
emitArrayLength drills down to the base non-array type; it handles nested VLAs.


Repository:
  rC Clang

https://reviews.llvm.org/D45306





More information about the cfe-commits mailing list