diff options
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Analysis/out-of-bounds.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/Analysis/out-of-bounds.c b/clang/test/Analysis/out-of-bounds.c index d6eca06571d..8c65b478f1c 100644 --- a/clang/test/Analysis/out-of-bounds.c +++ b/clang/test/Analysis/out-of-bounds.c @@ -146,3 +146,12 @@ void test4(int x) { if (x > 99) buf[x] = 1; } + +// Don't warn when indexing below the start of a symbolic region's whose +// base extent we don't know. +int *get_symbolic(); +void test_index_below_symboloc() { + int *buf = get_symbolic(); + buf[-1] = 0; // no-warning; +} + |

