xref: /llvm-project/clang-tools-extra/test/clang-tidy/checkers/bugprone/suspicious-memset-usage.c (revision 89a1d03e2b379e325daa5249411e414bbd995b5e)
1 // RUN: %check_clang_tidy  -expect-clang-tidy-error  %s bugprone-suspicious-memset-usage %t
2 
3 void *memset(void *, int, __SIZE_TYPE__);
4 void *memset(void *);
5 // CHECK-MESSAGES: :[[@LINE-1]]:7: error: conflicting types for 'memset'
6 
test(void)7 void test(void) {
8   // no crash
9   memset(undefine);
10   // CHECK-MESSAGES: :[[@LINE-1]]:10: error: use of undeclared identifier
11 }
12