[llvm] [ADT] Deprecate ArrayRef(std::nullopt) (PR #146011)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 26 23:03:05 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions h -- llvm/include/llvm/ADT/ArrayRef.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/include/llvm/ADT/ArrayRef.h b/llvm/include/llvm/ADT/ArrayRef.h
index cc3f23bd0..9305af8e4 100644
--- a/llvm/include/llvm/ADT/ArrayRef.h
+++ b/llvm/include/llvm/ADT/ArrayRef.h
@@ -68,7 +68,7 @@ namespace llvm {
 
     /// Construct an empty ArrayRef from std::nullopt.
     /*implicit*/ LLVM_DEPRECATED("Use {} or ArrayRef<T>() instead", "{}")
-        ArrayRef(std::nullopt_t) {}
+    ArrayRef(std::nullopt_t) {}
 
     /// Construct an ArrayRef from a single element.
     /*implicit*/ ArrayRef(const T &OneElt LLVM_LIFETIME_BOUND)

``````````

</details>


https://github.com/llvm/llvm-project/pull/146011


More information about the llvm-commits mailing list