summaryrefslogtreecommitdiffstats
path: root/test/Analysis/coverage.c
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2013-06-10 20:45:12 +0000
committerdim <dim@FreeBSD.org>2013-06-10 20:45:12 +0000
commitea266cad53e3d49771fa38103913d3ec7a166694 (patch)
tree8f7776b7310bebaf415ac5b69e46e9f928c37144 /test/Analysis/coverage.c
parentc72c57c9e9b69944e3e009cd5e209634839581d3 (diff)
downloadFreeBSD-src-ea266cad53e3d49771fa38103913d3ec7a166694.zip
FreeBSD-src-ea266cad53e3d49771fa38103913d3ec7a166694.tar.gz
Vendor import of clang tags/RELEASE_33/final r183502 (effectively, 3.3
release): http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_33/final@183502
Diffstat (limited to 'test/Analysis/coverage.c')
-rw-r--r--test/Analysis/coverage.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/Analysis/coverage.c b/test/Analysis/coverage.c
index 38e84e1..9e437d21 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;
OpenPOWER on IntegriCloud