Open llvmbot opened 10 years ago
Cloned to rdar://problem/16173744
More data: if the second index is replaced by a constant, or the first index is replaced by 0, the warning goes away.
My guess is that the analyzer is just unable to represent the location "foo[x][y]", because it's "&foo + x * sizeof(foo[0]) + y".
assigned to @tkremenek
Extended Description
When retained objects are assigned into a C array of greater than 1 dimension in a longer lived scope, the objects a potential leak is reported. I have tried this with a static global 2d array and an instance ivar. Attached test case contains both flavors.
Note that the same error does not occur with a 1d array.