diff options
author | hyeongyukim <gusrb406@snu.ac.kr> | 2022-02-18 17:00:00 +0900 |
---|---|---|
committer | hyeongyukim <gusrb406@snu.ac.kr> | 2022-02-18 17:02:41 +0900 |
commit | b529744c29a87d8ecf4336e751fee794df10ec7f (patch) | |
tree | 7beb370058ac4af30cc832d0304c941701a44ef2 /clang/lib/CodeGen/CGCall.cpp | |
parent | 38054556a08884aa15d3ebc720e2f43d0cb5a944 (diff) | |
download | llvm-b529744c29a87d8ecf4336e751fee794df10ec7f.zip llvm-b529744c29a87d8ecf4336e751fee794df10ec7f.tar.gz llvm-b529744c29a87d8ecf4336e751fee794df10ec7f.tar.bz2 |
[Clang] Rename `disable-noundef-analysis` flag to `-[no-]enable-noundef-analysis`
This flag was previously renamed `enable_noundef_analysis` to
`disable-noundef-analysis,` which is not a conventional name. (Driver and
CC1's boolean options are using [no-] prefix)
As discussed at https://reviews.llvm.org/D105169, this patch reverts its
name to `[no-]enable_noundef_analysis` and enables noundef-analysis as
default.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D119998
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index f1eb26e..017d403 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -2293,7 +2293,7 @@ void CodeGenModule::ConstructAttributeList(StringRef Name, getLangOpts().Sanitize.has(SanitizerKind::Return); // Determine if the return type could be partially undef - if (!CodeGenOpts.DisableNoundefAttrs && HasStrictReturn) { + if (CodeGenOpts.EnableNoundefAttrs && HasStrictReturn) { if (!RetTy->isVoidType() && RetAI.getKind() != ABIArgInfo::Indirect && DetermineNoUndef(RetTy, getTypes(), DL, RetAI)) RetAttrs.addAttribute(llvm::Attribute::NoUndef); @@ -2427,7 +2427,7 @@ void CodeGenModule::ConstructAttributeList(StringRef Name, } // Decide whether the argument we're handling could be partially undef - if (!CodeGenOpts.DisableNoundefAttrs && + if (CodeGenOpts.EnableNoundefAttrs && DetermineNoUndef(ParamType, getTypes(), DL, AI)) { Attrs.addAttribute(llvm::Attribute::NoUndef); } |