diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2009-12-15 18:49:47 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2009-12-15 18:49:47 +0000 |
| commit | 34d02d0b37f16015f317a935c48ce8b7b64ae77b (patch) | |
| tree | 2fd5819f49caecc5f520219b6b9254fe94ebb138 /test/Analysis/malloc.c | |
| parent | 1569ce68681d909594d64f9b056d71f5dd7563bf (diff) | |
Notes
Diffstat (limited to 'test/Analysis/malloc.c')
| -rw-r--r-- | test/Analysis/malloc.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/Analysis/malloc.c b/test/Analysis/malloc.c index 6a17cba3497b..0c5142ba4d3f 100644 --- a/test/Analysis/malloc.c +++ b/test/Analysis/malloc.c @@ -1,7 +1,9 @@ -// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-experimental-checks -analyzer-store=region -verify %s +// RUN: clang -cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-experimental-checks -analyzer-store=region -verify %s typedef __typeof(sizeof(int)) size_t; void *malloc(size_t); void free(void *); +void *realloc(void *ptr, size_t size); +void *calloc(size_t nmemb, size_t size); void f1() { int *p = malloc(10); @@ -35,3 +37,9 @@ int *f4() { p_f4 = malloc(10); return p_f4; // no-warning } + +int *f5() { + int *q = malloc(10); + q = realloc(q, 20); + return q; // no-warning +} |
