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

via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 24 04:01:33 PDT 2024


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 76f4f950f67b9f3f2d2789abbdffc24ea4506a09 57ed7711c3c09e8c99b37d88e4002a696cba1338 --extensions h -- llvm/include/llvm/ADT/ArrayRef.h llvm/include/llvm/Support/Compiler.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 1a2a8a307a..aaecd639de 100644
--- a/llvm/include/llvm/ADT/ArrayRef.h
+++ b/llvm/include/llvm/ADT/ArrayRef.h
@@ -71,7 +71,7 @@ namespace llvm {
 
     /// Construct an ArrayRef from a single element.
     /*implicit*/ ArrayRef(const T &OneElt LLVM_LIFETIME_BOUND)
-      : Data(&OneElt), Length(1) {}
+        : Data(&OneElt), Length(1) {}
 
     /// Construct an ArrayRef from a pointer and length.
     constexpr /*implicit*/ ArrayRef(const T *data, size_t length)

``````````

</details>


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


More information about the llvm-commits mailing list