[libc-commits] [libc] [libc][support][FixedVector] add reverse iterator (PR #86732)

via libc-commits libc-commits at lists.llvm.org
Tue Mar 26 13:28:13 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 ecfffbfd3921fd47f3afc1d03a7518b34ec396b3 ca5605fd0c45d7b73d5f57619ced17c6f01910c7 -- libc/src/__support/fixedvector.h libc/test/src/__support/fixedvector_test.cpp
``````````

</details>

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

``````````diff
diff --git a/libc/src/__support/fixedvector.h b/libc/src/__support/fixedvector.h
index 393190379d..81747ee100 100644
--- a/libc/src/__support/fixedvector.h
+++ b/libc/src/__support/fixedvector.h
@@ -59,7 +59,9 @@ public:
   static void destroy(FixedVector<T, CAPACITY> *store) { store->reset(); }
 
   using reverse_iterator = typename cpp::array<T, CAPACITY>::reverse_iterator;
-  LIBC_INLINE constexpr reverse_iterator rbegin() { return reverse_iterator{&store[item_count]}; }
+  LIBC_INLINE constexpr reverse_iterator rbegin() {
+    return reverse_iterator{&store[item_count]};
+  }
   LIBC_INLINE constexpr reverse_iterator rend() { return store.rend(); }
 };
 

``````````

</details>


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


More information about the libc-commits mailing list