kees added a comment. Can you refresh this patch to work with https://reviews.llvm.org/D148381 ? My testing seems to imply that it doesn't know the size of the array. I assume the `if (!IsUnboundedArray)` check is incomplete now. i.e. for a `__counted_by` array, I see the "unknown" remark:
array-bounds.c:341:2: remark: accessing unknown sized array by 'index - 1' [-Rarray-bounds] 341 | TEST_ACCESS(p, array, index, SHOULD_TRAP); | ^ which is from the `array-bounds.c` test cases: TEST_SIGNAL(counted_by_enforced_by_sanitizer, SIGILL) { struct annotated *p; int index = MAX_INDEX + unconst; p = alloc_annotated(index); REPORT_SIZE(p->array); TEST_ACCESS(p, array, index, SHOULD_TRAP); } Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144136/new/ https://reviews.llvm.org/D144136 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits