llvm-project/clang/test/Analysis/string-with-signedness.c
Artem Dergachev 0b5b1f14fd [analyzer] pr34779: CStringChecker: Accept non-standard headers.
Do not crash when trying to define and call a non-standard
strcpy(unsigned char *, unsigned char *) during analysis.

At the same time, do not try to actually evaluate the call.

Differential Revision: https://reviews.llvm.org/D39422

llvm-svn: 317565
2017-11-07 10:51:15 +00:00

11 lines
279 B
C

// 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);
}