blob: 4830f4e9691d89dde38b1e63c5788dd061912c02 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// RUN: %clang_analyze_cc1 -verify %s -Wno-incompatible-library-redeclaration \
// RUN: -analyzer-checker=alpha.unix.cstring.BufferOverlap
// expected-no-diagnostics
typedef typeof(sizeof(int)) size_t;
void memcpy(int dst, int src, size_t size);
void test_memcpy_proxy() {
memcpy(42, 42, 42); // no-crash
}
void strcpy(int dst, char *src);
void test_strcpy_proxy() {
strcpy(42, (char *)42); // no-crash
}
void strxfrm(int dst, char *src, size_t size);
void test_strxfrm_proxy() {
strxfrm(42, (char *)42, 42); // no-crash
}
|