summaryrefslogtreecommitdiffstats
path: root/test/Analysis/string-with-signedness.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Analysis/string-with-signedness.c')
-rw-r--r--test/Analysis/string-with-signedness.c10
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 0000000000..1b00971a83
--- /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);
+}