Open nickdesaulniers opened 6 years ago
mentioned in issue llvm/llvm-bugzilla-archive#51682
Clang also produces the same warning.
clang-diagnostic group is alias for Clang warnings. Could you please verify that Clang produces same warning? In such cases report should be changed to Clang.
Extended Description
STR:
clang-tidy -warnings-as-errors=clang-diagnostic-array-bounds test_case.c
/tmp/test_case.c:6:7: error: array index 300 is past the end of the array (which contains 10 elements) [clang-diagnostic-array-bounds,-warnings-as-errors] y[300] = 4; ^ /tmp/test_case.c:3:3: note: array 'y' declared here int y [10]; ^
My test case is definitely contrived, but I see effectively the same thing running clang-tidy on the Linux kernel in include/linux/signal.h:122