[analyzer] Improve underflow handling in ArrayBoundV2
This minor change ensures that underflow errors are reported on memory regions that are in unknown space but have a well-defined beginning. As a concrete example, the following test case did not produce a warning previously, but will produce a warning after this patch: typedef struct { int id; char name[256]; } user_t; user_t *get_symbolic_user(void); char test_underflow_symbolic_2() { user_t *user = get_symbolic_user(); return user->name[-1]; } Differential Revision: https://reviews.llvm.org/D157104
Loading
Please sign in to comment