summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/coverage.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/coverage.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/coverage.c')
-rw-r--r--clang/test/Analysis/coverage.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/test/Analysis/coverage.c b/clang/test/Analysis/coverage.c
index 38e84e17cee..9e437d21827 100644
--- a/clang/test/Analysis/coverage.c
+++ b/clang/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;
OpenPOWER on IntegriCloud