[Analysis] Use std::nullopt instead of None (NFC)
authorKazu Hirata <kazu@google.com>
Sat, 3 Dec 2022 19:34:25 +0000 (11:34 -0800)
committerKazu Hirata <kazu@google.com>
Sat, 3 Dec 2022 19:34:25 +0000 (11:34 -0800)
commit34e0d0579a3a6617b9b3212f2bc63d959c8f56c6
treeb07138eabf56dfee2b170dfb42073637531f42bd
parent180600660bbbdf8e74f7372a00e24edb219f0868
[Analysis] 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
14 files changed:
clang/include/clang/Analysis/Analyses/PostOrderCFGView.h
clang/include/clang/Analysis/Analyses/ThreadSafetyTIL.h
clang/include/clang/Analysis/AnyCall.h
clang/include/clang/Analysis/CFG.h
clang/include/clang/Analysis/ProgramPoint.h
clang/lib/Analysis/BodyFarm.cpp
clang/lib/Analysis/CFG.cpp
clang/lib/Analysis/CalledOnceCheck.cpp
clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp
clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp
clang/lib/Analysis/MacroExpansionContext.cpp
clang/lib/Analysis/PathDiagnostic.cpp
clang/lib/Analysis/RetainSummaryManager.cpp
clang/lib/Analysis/UninitializedValues.cpp