From e9857ddcc087079ba4320738fbc1a4c699e30c22 Mon Sep 17 00:00:00 2001 From: Zhongxing Xu Date: Thu, 13 Nov 2008 09:20:05 +0000 Subject: [PATCH] Add test for unsigned array index. llvm-svn: 59239 --- clang/test/Analysis/array-struct.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/clang/test/Analysis/array-struct.c b/clang/test/Analysis/array-struct.c index ae33a138908c..9548fa0d0e1c 100644 --- a/clang/test/Analysis/array-struct.c +++ b/clang/test/Analysis/array-struct.c @@ -59,3 +59,8 @@ void f7() { struct s2 *p = __builtin_alloca(10); g2(p); } + +void f8() { + int a[10]; + a[sizeof(a) - 1] = 1; +}