We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
#define foo(i, arr) ((i > 0) ? arr[i-1] : 0) int main(void) { does_not_exist(); int arr[] = {1, 2, 3}; foo(0, arr); }
clang thinks that when i is 0, we can access an out of bounds index through arr[i-1] even though we guard that access with the check (i > 0).
i
arr[i-1]
(i > 0)
https://godbolt.org/z/hzfn81ds3