From 68eb4c25e961d18f82b47a0a385f90d7af09bcc3 Mon Sep 17 00:00:00 2001 From: Anna Zaks Date: Sat, 6 Apr 2013 00:41:36 +0000 Subject: [analyzer] Shorten the malloc checker’s leak message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As per Ted’s suggestion! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178938 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Analysis/coverage.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/Analysis/coverage.c') diff --git a/test/Analysis/coverage.c b/test/Analysis/coverage.c index 38e84e17ce..9e437d2182 100644 --- a/test/Analysis/coverage.c +++ b/test/Analysis/coverage.c @@ -33,26 +33,26 @@ static void function_which_doesnt_give_up_nested(int *x, int *y) { void coverage1(int *x) { function_which_gives_up(x); char *m = (char*)malloc(12); -} // expected-warning {{potential leak}} +} // expected-warning {{Potential leak of memory pointed to by 'm'}} void coverage2(int *x) { if (x) { function_which_gives_up(x); char *m = (char*)malloc(12); } -} // expected-warning {{potential leak}} +} // expected-warning {{Potential leak of memory pointed to by 'm'}} void coverage3(int *x) { x++; function_which_gives_up(x); char *m = (char*)malloc(12); -} // expected-warning {{potential leak}} +} // expected-warning {{Potential leak of memory pointed to by 'm'}} void coverage4(int *x) { *x += another_function(x); function_which_gives_up(x); char *m = (char*)malloc(12); -} // expected-warning {{potential leak}} +} // expected-warning {{Potential leak of memory pointed to by 'm'}} void coverage5(int *x) { for (int i = 0; i<7; ++i) @@ -66,7 +66,7 @@ void coverage6(int *x) { function_which_gives_up(x); } char *m = (char*)malloc(12); -} // expected-warning {{potential leak}} +} // expected-warning {{Potential leak of memory pointed to by 'm'}} int coverage7_inline(int *i) { function_which_doesnt_give_up(&i); @@ -78,7 +78,7 @@ void coverage8(int *x) { function_which_doesnt_give_up_nested(x, &y); y = (*x)/y; // expected-warning {{Division by zero}} char *m = (char*)malloc(12); -} // expected-warning {{potential leak}} +} // expected-warning {{Potential leak of memory pointed to by 'm'}} void function_which_gives_up_settonull(int **x) { *x = 0; -- cgit v1.2.3-70-g09d2