summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/malloc-annotations.c
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2013-04-06 00:41:36 +0000
committerAnna Zaks <ganna@apple.com>2013-04-06 00:41:36 +0000
commita1de8567fcf50edb789a72fd563d9a17225954c7 (patch)
treeaa317153863eeb3f9f482d7758be8c93fc5dd08e /clang/test/Analysis/malloc-annotations.c
parentb54457242c1cb772cb40645b4cd553ce38aeb2dc (diff)
downloadbcm5719-llvm-a1de8567fcf50edb789a72fd563d9a17225954c7.tar.gz
bcm5719-llvm-a1de8567fcf50edb789a72fd563d9a17225954c7.zip
[analyzer] Shorten the malloc checker’s leak message
As per Ted’s suggestion! llvm-svn: 178938
Diffstat (limited to 'clang/test/Analysis/malloc-annotations.c')
-rw-r--r--clang/test/Analysis/malloc-annotations.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/test/Analysis/malloc-annotations.c b/clang/test/Analysis/malloc-annotations.c
index 3a260c3aefd..c197df4386e 100644
--- a/clang/test/Analysis/malloc-annotations.c
+++ b/clang/test/Analysis/malloc-annotations.c
@@ -26,7 +26,7 @@ struct stuff myglobalstuff;
void f1() {
int *p = malloc(12);
- return; // expected-warning{{Memory is never released; potential leak}}
+ return; // expected-warning{{Potential leak of memory pointed to by}}
}
void f2() {
@@ -54,17 +54,17 @@ void naf1() {
void n2af1() {
int *p = my_malloc2(12);
- return; // expected-warning{{Memory is never released; potential leak}}
+ return; // expected-warning{{Potential leak of memory pointed to by}}
}
void af1() {
int *p = my_malloc(12);
- return; // expected-warning{{Memory is never released; potential leak}}
+ return; // expected-warning{{Potential leak of memory pointed to by}}
}
void af1_b() {
int *p = my_malloc(12);
-} // expected-warning{{Memory is never released; potential leak}}
+} // expected-warning{{Potential leak of memory pointed to by}}
void af1_c() {
myglobalpointer = my_malloc(12); // no-warning
@@ -73,7 +73,7 @@ void af1_c() {
void af1_d() {
struct stuff mystuff;
mystuff.somefield = my_malloc(12);
-} // expected-warning{{Memory is never released; potential leak}}
+} // expected-warning{{Potential leak of memory pointed to by}}
// Test that we can pass out allocated memory via pointer-to-pointer.
void af1_e(void **pp) {
@@ -239,7 +239,7 @@ char mallocGarbage () {
// This tests that calloc() buffers need to be freed
void callocNoFree () {
char *buf = calloc(2,2);
- return; // expected-warning{{never released}}
+ return; // expected-warning{{Potential leak of memory pointed to by}}
}
// These test that calloc() buffers are zeroed by default
@@ -258,7 +258,7 @@ char callocZeroesBad () {
if (buf[1] != 0) {
free(buf); // expected-warning{{never executed}}
}
- return result; // expected-warning{{never released}}
+ return result; // expected-warning{{Potential leak of memory pointed to by}}
}
void testMultipleFreeAnnotations() {
OpenPOWER on IntegriCloud