[llvm] [ADT] Remove ArrayRef(std::nullopt_t) (PR #165831)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 30 23:17:14 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-adt
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
ArrayRef(std::nullopt_t) has been deprecated since:
commit 2529de5c935ad59e5f76d15890f857bf42817bc9
Author: Kazu Hirata <kazu@<!-- -->google.com>
Date: Fri Jun 27 01:03:02 2025 -0700
Note that we've made at lease one release, llvmorg-21.1, with this
deprecation.
---
Full diff: https://github.com/llvm/llvm-project/pull/165831.diff
1 Files Affected:
- (modified) llvm/include/llvm/ADT/ArrayRef.h (-4)
``````````diff
diff --git a/llvm/include/llvm/ADT/ArrayRef.h b/llvm/include/llvm/ADT/ArrayRef.h
index 448d10013d371..450f4d04c97fc 100644
--- a/llvm/include/llvm/ADT/ArrayRef.h
+++ b/llvm/include/llvm/ADT/ArrayRef.h
@@ -66,10 +66,6 @@ namespace llvm {
/// Construct an empty ArrayRef.
/*implicit*/ ArrayRef() = default;
- /// Construct an empty ArrayRef from std::nullopt.
- /*implicit*/ LLVM_DEPRECATED("Use {} or ArrayRef<T>() instead", "{}")
- ArrayRef(std::nullopt_t) {}
-
/// Construct an ArrayRef from a single element.
/*implicit*/ ArrayRef(const T &OneElt LLVM_LIFETIME_BOUND)
: Data(&OneElt), Length(1) {}
``````````
</details>
https://github.com/llvm/llvm-project/pull/165831
More information about the llvm-commits
mailing list