[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
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user