[clang] [llvm] [llvm][ADT] Make ImmutableList conform the fwd iterator concept (PR #202580)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 9 04:11:29 PDT 2026
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 origin/main HEAD --extensions cpp,h -- clang/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp llvm/include/llvm/ADT/ImmutableList.h llvm/unittests/ADT/ImmutableListTest.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/ADT/ImmutableList.h b/llvm/include/llvm/ADT/ImmutableList.h
index da5054549..24a4b732c 100644
--- a/llvm/include/llvm/ADT/ImmutableList.h
+++ b/llvm/include/llvm/ADT/ImmutableList.h
@@ -98,7 +98,11 @@ public:
iterator(ImmutableList l) : L(l.getInternalPointer()) {}
iterator& operator++() { L = L->getTail(); return *this; }
- iterator operator++(int) { iterator Tmp = *this; ++*this; return Tmp; }
+ iterator operator++(int) {
+ iterator Tmp = *this;
+ ++*this;
+ return Tmp;
+ }
bool operator==(const iterator& I) const { return L == I.L; }
bool operator!=(const iterator& I) const { return L != I.L; }
const value_type& operator*() const { return L->getHead(); }
``````````
</details>
https://github.com/llvm/llvm-project/pull/202580
More information about the cfe-commits
mailing list