[clang-tools-extra] b70fbd0 - [clangd] Use std::nullopt instead of None (NFC)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 6 23:50:26 PST 2022
Author: Kazu Hirata
Date: 2022-12-06T23:50:19-08:00
New Revision: b70fbd0fd96f8ab64e44c37d8a532d58907fff6a
URL: https://github.com/llvm/llvm-project/commit/b70fbd0fd96f8ab64e44c37d8a532d58907fff6a
DIFF: https://github.com/llvm/llvm-project/commit/b70fbd0fd96f8ab64e44c37d8a532d58907fff6a.diff
LOG: [clangd] Use std::nullopt instead of None (NFC)
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
Added:
Modified:
clang-tools-extra/clangd/CodeComplete.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/CodeComplete.cpp b/clang-tools-extra/clangd/CodeComplete.cpp
index b445854e5725..ad7878218709 100644
--- a/clang-tools-extra/clangd/CodeComplete.cpp
+++ b/clang-tools-extra/clangd/CodeComplete.cpp
@@ -56,7 +56,6 @@
#include "clang/Sema/DeclSpec.h"
#include "clang/Sema/Sema.h"
#include "llvm/ADT/ArrayRef.h"
-#include "llvm/ADT/None.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
@@ -271,7 +270,7 @@ struct CompletionCandidate {
// FIXME: We should support #import directives here.
if ((Inc.Directive & clang::clangd::Symbol::Include) != 0)
return Inc.Header;
- return None;
+ return std::nullopt;
}
using Bundle = llvm::SmallVector<CompletionCandidate, 4>;
More information about the cfe-commits
mailing list