Debian Codegraph @

clang/test/Analysis/buffer-overlap-decls.c

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