steakhal wrote:

claude told me about an allegedly interesting case for this PR, but I'll leave 
it here.

```c++
int TenElements[10];
int *disjointRangeSet(int i) {
  if (i > 10) return 0;
  if (i == 0) return 0;
  if (i == 1) return 0;
  if (i == 2) return 0;
  if (i == 3) return 0;
  if (i == 4) return 0;
  if (i == 5) return 0;
  if (i == 6) return 0;
  if (i == 7) return 0;
  if (i == 8) return 0;
  if (i == 9) return 0;
  // State now: i <= 10 && i not in {0..9}  =>  i in [MIN,-1] U {10}.
  return &TenElements[i]; // now warns; previously it didn't
}
```

The PR looks good to me btw.

https://github.com/llvm/llvm-project/pull/214540
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to