[llvm] Add clang::lifetimebound annotation to ArrayRef constructors. (PR #113547)

Gábor Horváth via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 24 11:36:23 PDT 2024


================
@@ -113,7 +115,8 @@ namespace llvm {
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Winit-list-lifetime"
 #endif
-    constexpr /*implicit*/ ArrayRef(const std::initializer_list<T> &Vec)
+    constexpr /*implicit*/ ArrayRef(
+        const std::initializer_list<T> &Vec LLVM_LIFETIME_BOUND)
----------------
Xazax-hun wrote:

Now that the patch to remove the reference from the initialiser list, this should no longer warn, right? 

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


More information about the llvm-commits mailing list