[ADT] Deprecate MutableArrayRef(std::nullopt) (#146113)
ArrayRef(std::nullopt) just got deprecated. This patch does the same to MutableArrayRef(std::nullopt). Since there are only a couple of uses, this patch does migration and deprecation at the same time.
This commit is contained in:
@@ -302,7 +302,7 @@ namespace clang {
|
||||
}
|
||||
MutableArrayRef<FunctionTemplateSpecializationInfo>
|
||||
getPartialSpecializations(FunctionTemplateDecl::Common *) {
|
||||
return std::nullopt;
|
||||
return {};
|
||||
}
|
||||
|
||||
template<typename DeclTy>
|
||||
|
||||
@@ -304,7 +304,8 @@ namespace llvm {
|
||||
/*implicit*/ MutableArrayRef() = default;
|
||||
|
||||
/// Construct an empty MutableArrayRef from std::nullopt.
|
||||
/*implicit*/ MutableArrayRef(std::nullopt_t) : ArrayRef<T>() {}
|
||||
/*implicit*/ LLVM_DEPRECATED("Use {} or MutableArrayRef<T>() instead", "{}")
|
||||
MutableArrayRef(std::nullopt_t) : ArrayRef<T>() {}
|
||||
|
||||
/// Construct a MutableArrayRef from a single element.
|
||||
/*implicit*/ MutableArrayRef(T &OneElt) : ArrayRef<T>(OneElt) {}
|
||||
|
||||
@@ -727,7 +727,7 @@ SourceMgrDiagnosticVerifierHandlerImpl::computeExpectedDiags(
|
||||
raw_ostream &os, llvm::SourceMgr &mgr, const llvm::MemoryBuffer *buf) {
|
||||
// If the buffer is invalid, return an empty list.
|
||||
if (!buf)
|
||||
return std::nullopt;
|
||||
return {};
|
||||
auto &expectedDiags = expectedDiagsPerFile[buf->getBufferIdentifier()];
|
||||
|
||||
// The number of the last line that did not correlate to a designator.
|
||||
|
||||
Reference in New Issue
Block a user