diff options
author | Kazu Hirata <kazu@google.com> | 2023-01-07 20:19:42 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2023-01-07 20:19:42 -0800 |
commit | f71ffd3b735b4d6ae3c12be1806cdd6205b3b378 (patch) | |
tree | 2f23da30b62520864835b00f063b17f4502cfb29 /clang-tools-extra/clang-doc | |
parent | 71f557355ddaea358c43b151de3a0e045aaa0863 (diff) | |
download | llvm-f71ffd3b735b4d6ae3c12be1806cdd6205b3b378.tar.gz |
[clang-tools-extra] Use std::optional instead of llvm::Optional (NFC)
This patch replaces (llvm::|)Optional< with std::optional<. I'll post
a separate patch to clean up the "using" declarations, #include
"llvm/ADT/Optional.h", etc.
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-tools-extra/clang-doc')
-rw-r--r-- | clang-tools-extra/clang-doc/HTMLGenerator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang-tools-extra/clang-doc/HTMLGenerator.cpp b/clang-tools-extra/clang-doc/HTMLGenerator.cpp index 589a3232c90c..b61780ca4d97 100644 --- a/clang-tools-extra/clang-doc/HTMLGenerator.cpp +++ b/clang-tools-extra/clang-doc/HTMLGenerator.cpp @@ -309,7 +309,7 @@ static std::unique_ptr<TagNode> genLink(const Twine &Text, const Twine &Link) { static std::unique_ptr<HTMLNode> genReference(const Reference &Type, StringRef CurrentDirectory, - llvm::Optional<StringRef> JumpToSection = std::nullopt) { + std::optional<StringRef> JumpToSection = std::nullopt) { if (Type.Path.empty()) { if (!JumpToSection) return std::make_unique<TextNode>(Type.Name); @@ -438,7 +438,7 @@ genReferencesBlock(const std::vector<Reference> &References, static std::unique_ptr<TagNode> writeFileDefinition(const Location &L, - llvm::Optional<StringRef> RepositoryUrl = std::nullopt) { + std::optional<StringRef> RepositoryUrl = std::nullopt) { if (!L.IsFileInRootDir || !RepositoryUrl) return std::make_unique<TagNode>( HTMLTag::TAG_P, "Defined at line " + std::to_string(L.LineNumber) + |