commit | c3bcc36a0bdb87ec56ec77da88a7ce8eb5051a81 | [log] [tgz] |
---|---|---|
author | Jordy Rose <jediknil@belkadan.com> | Fri Jun 25 23:23:04 2010 +0000 |
committer | Jordy Rose <jediknil@belkadan.com> | Fri Jun 25 23:23:04 2010 +0000 |
tree | cbf123e9151b54851215b09fa2fbd604fcba4671 | |
parent | f94c8c2bf94b81788f25b941ff39a30dec92e673 [diff] [blame] |
When a constant size array is casted to another type, its length should be scaled as well. llvm-svn: 106911
diff --git a/clang/test/Analysis/no-outofbounds.c b/clang/test/Analysis/no-outofbounds.c index 771323b..49ee80e 100644 --- a/clang/test/Analysis/no-outofbounds.c +++ b/clang/test/Analysis/no-outofbounds.c
@@ -12,3 +12,9 @@ short *z = (short*) &x; short s = z[0] + z[1]; // no-warning } + +void g() { + int a[2]; + char *b = (char*)a; + b[3] = 'c'; // no-warning +}