<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/115620>115620</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-tidy] figure out if an iteration is actually problematic in `bugprone-nondeterministic-pointer-iteration-order`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-tidy,
false-positive
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
5chmidti
</td>
</tr>
</table>
<pre>
https://clang.llvm.org/extra/clang-tidy/checks/bugprone/nondeterministic-pointer-iteration-order.html
> This check currently does not check if a nondeterministic iteration order is likely to be a mistake, and instead marks all such iterations as bugprone.
As stated in https://github.com/llvm/llvm-project/pull/110471#issuecomment-2400972013, `Expr::hasSideEffects` may be an easy and quick way to determine if there is an observable effect (e.g., I/O). It would be good, if in the end, the check would detect, e.g., string concatenation but ignore commutative operations (e.g., accumulate).
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUU8tyrDYQ_Rqx6RpKiGFmWLBwbFN1V1kkP9CIBpQREpFavp6_Twl77ElWuRseatXpPo_GGM3siDrR_CaalwITLz50jV5WM7IpBj_euoV5i6J-EqoXqtcW3Vxa-7aWPsxC9fTOAe-FA5vxln8W0tcoVD-keQvekVC9824kprAaZyIbfdi8cUzhYJgCsvHu4MNIoVx4tUK-CPn0-axf4c_FRNhRQacQyLG9wegpgvP8WTATIPy3C3yhw44OJoI1V7I3YA8DAcJqIuOVhHoGdCMYF5lwhBXDNQJaCzHp5RsnAka48yofB32KEBmZMgb8W7bZ8JKGUvtVqD6r9_k6bMH_RZqF6rdkrVB9VcnjuRKqNjEm0n5dyfFBHaVsz0pWdR5TnOTr-xYyev20YPzDjPQ6TaQ5ipOEFW87MweE8baT-jsZfYWfuLO-C0RZMl4oUFYFHfghUnjDwRLQDgdCXaicy9z0h1D970K1Jfxg-OmTHXOT2fsxV82USfNCQG4_yJ8fvnzczU0zz2e4A0YOxs2gvdPI5D5MGhKDmZ0PBJl7YmTzRuC3L_UfRkKt05osMuW5irGrx7ZusaCuOtdV1cqjaoulu0zyrNU0TadGNzQe8YznqblIqrQaK9SF6ZRUx6qSrVJVfWxLpS7NROfLVE_tQKMWR0krGvsV_GJ3p6uq5qRkYXEgG_ctUupxEZRQz0KpCW2kw-ajyWTycfNShG4PwJDmKI7SmsjxG54N230tH9CaF5jMnAKBzyJN2bHvdGcHNSe09gZb8IOlFff8uxyXe14P_3cLxUkWKdjul2O8CxP3IO_avHXqnwAAAP__3ft6Sw">