diff --git a/clang/include/clang/Basic/CodeGenOptions.def b/clang/include/clang/Basic/CodeGenOptions.def --- a/clang/include/clang/Basic/CodeGenOptions.def +++ b/clang/include/clang/Basic/CodeGenOptions.def @@ -231,6 +231,8 @@ ENUM_CODEGENOPT(SanitizeAddressDtor, llvm::AsanDtorKind, 2, llvm::AsanDtorKind::Global) ///< Set how ASan global ///< destructors are emitted. +CODEGENOPT(SanitizeMemoryParamRetval, 1, 0) ///

, NormalizedValues<["None", "Global"]>, MarshallingInfoEnum, "Global">; +defm sanitize_memory_param_retval + : BoolOption<"f", "sanitize-memory-param-retval", + CodeGenOpts<"SanitizeMemoryParamRetval">, + DefaultFalse, + PosFlag, NegFlag, + BothFlags<[], "Detect uninitialized parameters and return values.">>, + Group; // Note: This flag was introduced when it was necessary to distinguish between // ABI for correct codegen. This is no longer needed, but the flag is // not removed since targeting either ABI will behave the same.