aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/FileManager.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-12-03 11:34:27 -0800
committerKazu Hirata <kazu@google.com>2022-12-03 11:34:27 -0800
commiteeee3fee37a65d68ebbfcb6e78b6b2e018180b0c (patch)
treec56d82b81c020e541040542c478b1f4da3a4ac46 /clang/lib/Basic/FileManager.cpp
parent34e0d0579a3a6617b9b3212f2bc63d959c8f56c6 (diff)
downloadllvm-eeee3fee37a65d68ebbfcb6e78b6b2e018180b0c.zip
llvm-eeee3fee37a65d68ebbfcb6e78b6b2e018180b0c.tar.gz
llvm-eeee3fee37a65d68ebbfcb6e78b6b2e018180b0c.tar.bz2
[Basic] 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/Basic/FileManager.cpp')
-rw-r--r--clang/lib/Basic/FileManager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Basic/FileManager.cpp b/clang/lib/Basic/FileManager.cpp
index 4ef2535..69ebd3b 100644
--- a/clang/lib/Basic/FileManager.cpp
+++ b/clang/lib/Basic/FileManager.cpp
@@ -474,7 +474,7 @@ llvm::Optional<FileEntryRef> FileManager::getBypassFile(FileEntryRef VF) {
// Stat of the file and return nullptr if it doesn't exist.
llvm::vfs::Status Status;
if (getStatValue(VF.getName(), Status, /*isFile=*/true, /*F=*/nullptr))
- return None;
+ return std::nullopt;
if (!SeenBypassFileEntries)
SeenBypassFileEntries = std::make_unique<