diff options
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 564a754a81c..6f2a27f977a 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -2291,7 +2291,7 @@ void CodeGenFunction::EmitFunctionEpilog(const CGFunctionInfo &FI, llvm::Instruction *Ret; if (RV) { - if (SanOpts.ReturnsNonnullAttribute) { + if (SanOpts.has(SanitizerKind::ReturnsNonnullAttribute)) { if (auto RetNNAttr = CurGD.getDecl()->getAttr<ReturnsNonNullAttr>()) { SanitizerScope SanScope(this); llvm::Value *Cond = Builder.CreateICmpNE( @@ -2618,7 +2618,7 @@ void CallArgList::freeArgumentMemory(CodeGenFunction &CGF) const { static void emitNonNullArgCheck(CodeGenFunction &CGF, RValue RV, QualType ArgType, SourceLocation ArgLoc, const FunctionDecl *FD, unsigned ParmNum) { - if (!CGF.SanOpts.NonnullAttribute || !FD) + if (!CGF.SanOpts.has(SanitizerKind::NonnullAttribute) || !FD) return; auto PVD = ParmNum < FD->getNumParams() ? FD->getParamDecl(ParmNum) : nullptr; unsigned ArgNo = PVD ? PVD->getFunctionScopeIndex() : ParmNum; |