================ @@ -1759,20 +1759,29 @@ void CodeGenFunction::emitZeroOrPatternForAutoVarInit(QualType type, const VarDecl &D, Address Loc) { auto trivialAutoVarInit = getContext().getLangOpts().getTrivialAutoVarInit(); + auto trivialAutoVarInitSizeBound = + getContext().getLangOpts().TrivialAutoVarInitSizeBound; CharUnits Size = getContext().getTypeSizeInChars(type); bool isVolatile = type.isVolatileQualified(); if (!Size.isZero()) { + auto allocSize = CGM.getDataLayout().getTypeAllocSize(Loc.getElementType()); ---------------- haopliu wrote:
Thank you both for clarifying! Moved the filtering to `emitStoresForConstant` before memset. Please take another look :-D https://github.com/llvm/llvm-project/pull/74777 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits