eugenis added inline comments.
================ Comment at: clang/lib/CodeGen/CGCall.cpp:2384 + if ((CodeGenOpts.EnableNoundefAttrs || + CodeGenOpts.SanitizeMemoryParamRetval) && + ArgNoUndef) ---------------- vitalybuka wrote: > vitalybuka wrote: > > @eugenis Would be better to force CodeGenOpts.EnableNoundefAttrs if > > SanitizeMemoryParamRetval is provided? > > @eugenis Would be better to force CodeGenOpts.EnableNoundefAttrs if > > SanitizeMemoryParamRetval is provided? > > To clarify, checking SanitizeMemoryParamRetval here as-is is LGTM, unless > @eugenis or someone else thinks EnableNoundefAttrs reset is better. I don't think this is right at all. An argument being noundef has nothing to do at all with memory sanitization. It affects optimization, too. SanitizeMemoryParamRetval should only affect what MemorySanitizerPass does with noundef attributes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116633/new/ https://reviews.llvm.org/D116633 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits