[clang] [clang] Add size filter for stack auto init (PR #74777)
Vitaly Buka via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 15 01:00:42 PST 2023
================
@@ -1205,10 +1205,19 @@ static void emitStoresForConstant(CodeGenModule &CGM, const VarDecl &D,
}
auto *SizeVal = llvm::ConstantInt::get(CGM.IntPtrTy, ConstantSize);
+ auto trivialAutoVarInitMaxSize =
----------------
vitalybuka wrote:
would it be simpler
```
if (IsAutoInit && sizeVal->getValue().sgt(trivialAutoVarInitMaxSize))
return;
```
https://github.com/llvm/llvm-project/pull/74777
More information about the cfe-commits
mailing list