summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/null-deref-path-notes.c
diff options
context:
space:
mode:
authorArtem Dergachev <artem.dergachev@gmail.com>2019-12-10 16:48:17 -0800
committerArtem Dergachev <artem.dergachev@gmail.com>2019-12-11 11:22:36 -0800
commit134faae04259b0412a067c73069f61905fc451d7 (patch)
treeb1d7087bedbf4dc28a0de01a978e916372c5e13f /clang/test/Analysis/null-deref-path-notes.c
parentb361d3bbcd85647c9f6640a5f57932c43fdb7a1a (diff)
downloadbcm5719-llvm-134faae04259b0412a067c73069f61905fc451d7.tar.gz
bcm5719-llvm-134faae04259b0412a067c73069f61905fc451d7.zip
[analyzer] CStringChecker: Improve warning messages.
Differential Revision: https://reviews.llvm.org/D71321
Diffstat (limited to 'clang/test/Analysis/null-deref-path-notes.c')
-rw-r--r--clang/test/Analysis/null-deref-path-notes.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/clang/test/Analysis/null-deref-path-notes.c b/clang/test/Analysis/null-deref-path-notes.c
index c73f64066b2..b1bef63390d 100644
--- a/clang/test/Analysis/null-deref-path-notes.c
+++ b/clang/test/Analysis/null-deref-path-notes.c
@@ -13,40 +13,40 @@ void *memcpy(void *dest, const void *src, unsigned long count);
void f1(char *source) {
char *destination = 0; // expected-note{{'destination' initialized to a null pointer value}}
- memcpy(destination + 0, source, 10); // expected-warning{{Null pointer argument in call to memory copy function}}
- // expected-note@-1{{Null pointer argument in call to memory copy function}}
+ memcpy(destination + 0, source, 10); // expected-warning{{Null pointer passed as 1st argument to memory copy function}}
+ // expected-note@-1{{Null pointer passed as 1st argument to memory copy function}}
}
void f2(char *source) {
char *destination = 0; // expected-note{{'destination' initialized to a null pointer value}}
- memcpy(destination - 0, source, 10); // expected-warning{{Null pointer argument in call to memory copy function}}
- // expected-note@-1{{Null pointer argument in call to memory copy function}}
+ memcpy(destination - 0, source, 10); // expected-warning{{Null pointer passed as 1st argument to memory copy function}}
+ // expected-note@-1{{Null pointer passed as 1st argument to memory copy function}}
}
void f3(char *source) {
char *destination = 0; // expected-note{{'destination' initialized to a null pointer value}}
destination = destination + 0; // expected-note{{Null pointer value stored to 'destination'}}
- memcpy(destination, source, 10); // expected-warning{{Null pointer argument in call to memory copy function}}
- // expected-note@-1{{Null pointer argument in call to memory copy function}}
+ memcpy(destination, source, 10); // expected-warning{{Null pointer passed as 1st argument to memory copy function}}
+ // expected-note@-1{{Null pointer passed as 1st argument to memory copy function}}
}
void f4(char *source) {
char *destination = 0; // expected-note{{'destination' initialized to a null pointer value}}
destination = destination - 0; // expected-note{{Null pointer value stored to 'destination'}}
- memcpy(destination, source, 10); // expected-warning{{Null pointer argument in call to memory copy function}}
- // expected-note@-1{{Null pointer argument in call to memory copy function}}
+ memcpy(destination, source, 10); // expected-warning{{Null pointer passed as 1st argument to memory copy function}}
+ // expected-note@-1{{Null pointer passed as 1st argument to memory copy function}}
}
void f5(char *source) {
char *destination1 = 0; // expected-note{{'destination1' initialized to a null pointer value}}
char *destination2 = destination1 + 0; // expected-note{{'destination2' initialized to a null pointer value}}
- memcpy(destination2, source, 10); // expected-warning{{Null pointer argument in call to memory copy function}}
- // expected-note@-1{{Null pointer argument in call to memory copy function}}
+ memcpy(destination2, source, 10); // expected-warning{{Null pointer passed as 1st argument to memory copy function}}
+ // expected-note@-1{{Null pointer passed as 1st argument to memory copy function}}
}
void f6(char *source) {
char *destination1 = 0; // expected-note{{'destination1' initialized to a null pointer value}}
char *destination2 = destination1 - 0; // expected-note{{'destination2' initialized to a null pointer value}}
- memcpy(destination2, source, 10); // expected-warning{{Null pointer argument in call to memory copy function}}
- // expected-note@-1{{Null pointer argument in call to memory copy function}}
+ memcpy(destination2, source, 10); // expected-warning{{Null pointer passed as 1st argument to memory copy function}}
+ // expected-note@-1{{Null pointer passed as 1st argument to memory copy function}}
}
OpenPOWER on IntegriCloud