[PATCH] D85424: [Analyzer] Crash fix for alpha.cplusplus.IteratorRange

Balogh, Ádám via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 10 07:41:51 PDT 2020


baloghadamsoftware added a comment.

In D85424#2258886 <https://reviews.llvm.org/D85424#2258886>, @steakhal wrote:

> void foo(int x) {
>
>   int uninit;
>   x - uninit; // will-crash
>
> }

This is not even related to the iterators. We could check first whether `LHS` is an iterator and early exit if not. However, that does not help, the checker crashes if we try to add or subtract an unitialized value to/from an iterator.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85424/new/

https://reviews.llvm.org/D85424



More information about the cfe-commits mailing list