[llvm] [ADT] Make Zippy more iterator-like for lifetime safety (PR #112441)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 15 14:56:00 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 23da16933b8ad48a967905369f576e5ec45b985f 75eb8c747a41c5e9a0275def57e534083d973921 --extensions h,cpp -- llvm/include/llvm/ADT/STLExtras.h llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp llvm/unittests/ADT/IteratorTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/ADT/STLExtras.h b/llvm/include/llvm/ADT/STLExtras.h
index 3692b199c9..672b068f9f 100644
--- a/llvm/include/llvm/ADT/STLExtras.h
+++ b/llvm/include/llvm/ADT/STLExtras.h
@@ -707,7 +707,8 @@ struct zip_common : public zip_traits<ZipType, ReferenceTupleType, Iters...> {
mutable std::optional<value_type> value;
protected:
- template <size_t... Ns> const value_type &deref(std::index_sequence<Ns...>) const {
+ template <size_t... Ns>
+ const value_type &deref(std::index_sequence<Ns...>) const {
value.emplace(*std::get<Ns>(iterators)...);
return *value;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/112441
More information about the llvm-commits
mailing list