aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-12-03 11:13:43 -0800
committerKazu Hirata <kazu@google.com>2022-12-03 11:13:43 -0800
commitbb666c69300c962c6a259c9d8e504601e557bc30 (patch)
tree1f0cdb793fcf70bfa588a4610cf0aad1712fdecf /clang/lib/CodeGen/CodeGenFunction.cpp
parente31564afc3670d512274ccaa49e4fdd905f6b3d6 (diff)
downloadllvm-bb666c69300c962c6a259c9d8e504601e557bc30.zip
llvm-bb666c69300c962c6a259c9d8e504601e557bc30.tar.gz
llvm-bb666c69300c962c6a259c9d8e504601e557bc30.tar.bz2
[CodeGen] Use std::nullopt instead of None (NFC)
This patch mechanically replaces None with std::nullopt where the compiler would warn if None were deprecated. The intent is to reduce the amount of manual work required in migrating from Optional to std::optional. This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index 3686c94..e589b6e 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/lib/CodeGen/CodeGenFunction.cpp
@@ -1467,7 +1467,7 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn,
llvm::Value *IsFalse = Builder.getFalse();
EmitCheck(std::make_pair(IsFalse, SanitizerKind::Return),
SanitizerHandler::MissingReturn,
- EmitCheckSourceLocation(FD->getLocation()), None);
+ EmitCheckSourceLocation(FD->getLocation()), std::nullopt);
} else if (ShouldEmitUnreachable) {
if (CGM.getCodeGenOpts().OptimizationLevel == 0)
EmitTrapCall(llvm::Intrinsic::trap);