diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:11:37 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:11:37 +0000 |
commit | 461a67fa15370a9ec88f8f8a240bf7c123bb2029 (patch) | |
tree | 6942083d7d56bba40ec790a453ca58ad3baf6832 /test/Analysis/string-with-signedness.c | |
parent | 75c3240472ba6ac2669ee72ca67eb72d4e2851fc (diff) |
Diffstat (limited to 'test/Analysis/string-with-signedness.c')
-rw-r--r-- | test/Analysis/string-with-signedness.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Analysis/string-with-signedness.c b/test/Analysis/string-with-signedness.c new file mode 100644 index 0000000000000..1b00971a834cf --- /dev/null +++ b/test/Analysis/string-with-signedness.c @@ -0,0 +1,10 @@ +// RUN: %clang_analyze_cc1 -Wno-incompatible-library-redeclaration -analyzer-checker=core,unix.cstring,alpha.unix.cstring -verify %s + +// expected-no-diagnostics + +void *strcpy(unsigned char *, unsigned char *); + +unsigned char a, b; +void testUnsignedStrcpy() { + strcpy(&a, &b); +} |