[PATCH] D39049: [analyzer] Fix wrong calculation of offset in ArrayBoundsV2

Daniel Marjamäki via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 26 13:14:24 PDT 2017

danielmarjamaki added a comment.

> Do you mind writing some tests with multidimensional arrays to check what do we lose if we remove that code?

I have spent a few hours trying to write a test case that shows there is false negatives caused by this change. And fail.

I see lots of false negatives for multidimensional arrays with or without this code.

For instance:

  void f(int x) {
    int buf[2][3];
    if (x < 4 || x>10)
    buf[1][x] = 0;



More information about the cfe-commits mailing list