diff options
author | Kazu Hirata <kazu@google.com> | 2022-12-09 18:39:01 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2022-12-09 18:39:01 -0800 |
commit | 37a3e98c841e5d33f7e77e97dfb058965105eb4b (patch) | |
tree | ad5a65839002bd4abc347033af34c2eaa4ee8f3a /clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp | |
parent | 70010893f93c46183c820f845fd7db14be737cae (diff) | |
download | llvm-37a3e98c841e5d33f7e77e97dfb058965105eb4b.zip llvm-37a3e98c841e5d33f7e77e97dfb058965105eb4b.tar.gz llvm-37a3e98c841e5d33f7e77e97dfb058965105eb4b.tar.bz2 |
[clang] Use std::nullopt instead of None in comments (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/Serialization/SymbolGraphSerializer.cpp')
-rw-r--r-- | clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp b/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp index 91dc252..cea4d91 100644 --- a/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp +++ b/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp @@ -56,8 +56,8 @@ void serializeArray(Object &Paren, StringRef Key, Optional<Array> Array) { /// } /// \endcode /// -/// \returns \c None if the version \p V is empty, or an \c Object containing -/// the semantic version representation of \p V. +/// \returns \c std::nullopt if the version \p V is empty, or an \c Object +/// containing the semantic version representation of \p V. Optional<Object> serializeSemanticVersion(const VersionTuple &V) { if (V.empty()) return std::nullopt; @@ -142,8 +142,8 @@ Object serializeSourceRange(const PresumedLoc &BeginLoc, /// or deprecated, i.e. \c __attribute__((unavailable)) and \c /// __attribute__((deprecated)). /// -/// \returns \c None if the symbol has default availability attributes, or -/// an \c Array containing the formatted availability information. +/// \returns \c std::nullopt if the symbol has default availability attributes, +/// or an \c Array containing the formatted availability information. Optional<Array> serializeAvailability(const AvailabilitySet &Availabilities) { if (Availabilities.isDefault()) return std::nullopt; @@ -228,8 +228,8 @@ Object serializeIdentifier(const APIRecord &Record, Language Lang) { /// ^~~~~~~~~~~~~~~~~~~~~~~' Second line. /// \endcode /// -/// \returns \c None if \p Comment is empty, or an \c Object containing the -/// formatted lines. +/// \returns \c std::nullopt if \p Comment is empty, or an \c Object containing +/// the formatted lines. Optional<Object> serializeDocComment(const DocComment &Comment) { if (Comment.empty()) return std::nullopt; @@ -280,8 +280,8 @@ Optional<Object> serializeDocComment(const DocComment &Comment) { /// ] /// \endcode /// -/// \returns \c None if \p DF is empty, or an \c Array containing the formatted -/// declaration fragments array. +/// \returns \c std::nullopt if \p DF is empty, or an \c Array containing the +/// formatted declaration fragments array. Optional<Array> serializeDeclarationFragments(const DeclarationFragments &DF) { if (DF.getFragments().empty()) return std::nullopt; @@ -447,7 +447,7 @@ Optional<Object> serializeFunctionSignatureMixinImpl(const RecordTy &Record, /// - The \c parameters array contains names and declaration fragments of the /// parameters. /// -/// \returns \c None if \p FS is empty, or an \c Object containing the +/// \returns \c std::nullopt if \p FS is empty, or an \c Object containing the /// formatted function signature. template <typename RecordTy> void serializeFunctionSignatureMixin(Object &Paren, const RecordTy &Record) { |