diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-02-28 01:26:35 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-02-28 01:26:35 +0000 |
commit | 183f0fb4cf264f24fdda18b2f1c6fc2fb268f7eb (patch) | |
tree | a796a6c9c44a195b803fc05703d0ac80238a6cb6 /clang/test/Analysis/no-outofbounds.c | |
parent | 4e23dbd0fd8458d387abd249dd987d782da962df (diff) | |
download | bcm5719-llvm-183f0fb4cf264f24fdda18b2f1c6fc2fb268f7eb.tar.gz bcm5719-llvm-183f0fb4cf264f24fdda18b2f1c6fc2fb268f7eb.zip |
[analyzer] Migrate MallocChecker to CheckerV2.
llvm-svn: 126606
Diffstat (limited to 'clang/test/Analysis/no-outofbounds.c')
-rw-r--r-- | clang/test/Analysis/no-outofbounds.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/test/Analysis/no-outofbounds.c b/clang/test/Analysis/no-outofbounds.c index 92cb8b32711..4217eaf3830 100644 --- a/clang/test/Analysis/no-outofbounds.c +++ b/clang/test/Analysis/no-outofbounds.c @@ -25,7 +25,9 @@ void free(void *); void field() { struct vec { size_t len; int data[0]; }; - struct vec *a = malloc(sizeof(struct vec) + 10); + // FIXME: Not warn for this. + struct vec *a = malloc(sizeof(struct vec) + 10); // expected-warning {{Cast a region whose size is not a multiple of the destination type size}} a->len = 10; a->data[1] = 5; // no-warning + free(a); } |