aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/ExtractAPI/ExtractAPIConsumer.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-12-09 23:03:10 -0800
committerKazu Hirata <kazu@google.com>2022-12-09 23:03:10 -0800
commitf655cb0f580ffab1a7d2ffb73043661bba449a44 (patch)
tree9d572f403eb8c9c5714e0906455e9c2401203e99 /clang/lib/ExtractAPI/ExtractAPIConsumer.cpp
parente8aee7ef73a759e9307fccb0fc3329d676eca737 (diff)
downloadllvm-f655cb0f580ffab1a7d2ffb73043661bba449a44.zip
llvm-f655cb0f580ffab1a7d2ffb73043661bba449a44.tar.gz
llvm-f655cb0f580ffab1a7d2ffb73043661bba449a44.tar.bz2
[ExtractAPI] Use std::optional in ExtractAPIConsumer.cpp (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
Diffstat (limited to 'clang/lib/ExtractAPI/ExtractAPIConsumer.cpp')
-rw-r--r--clang/lib/ExtractAPI/ExtractAPIConsumer.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/ExtractAPI/ExtractAPIConsumer.cpp b/clang/lib/ExtractAPI/ExtractAPIConsumer.cpp
index 7c56818..5f185d0 100644
--- a/clang/lib/ExtractAPI/ExtractAPIConsumer.cpp
+++ b/clang/lib/ExtractAPI/ExtractAPIConsumer.cpp
@@ -47,6 +47,7 @@
#include "llvm/Support/Regex.h"
#include "llvm/Support/raw_ostream.h"
#include <memory>
+#include <optional>
#include <utility>
using namespace clang;
@@ -61,9 +62,9 @@ StringRef getTypedefName(const TagDecl *Decl) {
return {};
}
-Optional<std::string> getRelativeIncludeName(const CompilerInstance &CI,
- StringRef File,
- bool *IsQuoted = nullptr) {
+std::optional<std::string> getRelativeIncludeName(const CompilerInstance &CI,
+ StringRef File,
+ bool *IsQuoted = nullptr) {
assert(CI.hasFileManager() &&
"CompilerInstance does not have a FileNamager!");