aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaModule.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-12-03 11:13:39 -0800
committerKazu Hirata <kazu@google.com>2022-12-03 11:13:39 -0800
commit8595f2e54d2df80e8d0f9de415324eaae510a84a (patch)
tree1b64443aa8d50480efc11202b6d58c19a390f810 /clang/lib/Sema/SemaModule.cpp
parentfee041f69de071cf813c332abc8be279ff7c0bb7 (diff)
downloadllvm-8595f2e54d2df80e8d0f9de415324eaae510a84a.zip
llvm-8595f2e54d2df80e8d0f9de415324eaae510a84a.tar.gz
llvm-8595f2e54d2df80e8d0f9de415324eaae510a84a.tar.bz2
[Sema] 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/Sema/SemaModule.cpp')
-rw-r--r--clang/lib/Sema/SemaModule.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaModule.cpp b/clang/lib/Sema/SemaModule.cpp
index 1a48a060..bb045760 100644
--- a/clang/lib/Sema/SemaModule.cpp
+++ b/clang/lib/Sema/SemaModule.cpp
@@ -836,7 +836,7 @@ static llvm::Optional<UnnamedDeclKind> getUnnamedDeclKind(Decl *D) {
if (isa<UsingDirectiveDecl>(D))
return UnnamedDeclKind::UsingDirective;
// Everything else either introduces one or more names or is ill-formed.
- return llvm::None;
+ return std::nullopt;
}
unsigned getUnnamedDeclDiag(UnnamedDeclKind UDK, bool InBlock) {