brintos

brintos / llvm-project-archived public Read only

0
0
Text · 538 B · 4830f4e Raw
24 lines · c
1// RUN: %clang_analyze_cc1 -verify %s -Wno-incompatible-library-redeclaration \2// RUN:   -analyzer-checker=alpha.unix.cstring.BufferOverlap3// expected-no-diagnostics4 5typedef typeof(sizeof(int)) size_t;6 7void memcpy(int dst, int src, size_t size);8 9void test_memcpy_proxy() {10  memcpy(42, 42, 42); // no-crash11}12 13void strcpy(int dst, char *src);14 15void test_strcpy_proxy() {16  strcpy(42, (char *)42); // no-crash17}18 19void strxfrm(int dst, char *src, size_t size);20 21void test_strxfrm_proxy() {22  strxfrm(42, (char *)42, 42); // no-crash23}24