[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Analysis / malloc-custom.c
blob5cbbf9f39c040da49bebf8dd3c618dc5aceaec5e
1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,unix.Malloc -Wno-incompatible-library-redeclaration -verify %s
3 // Various tests to make the analyzer is robust against custom
4 // redeclarations of memory routines.
5 //
6 // You wouldn't expect to see much of this in normal code, but, for example,
7 // CMake tests can generate these.
9 // expected-no-diagnostics
11 char alloca(void);
12 char malloc(void);
13 char realloc(void);
14 char kmalloc(void);
15 char valloc(void);
16 char calloc(void);
18 char free(void);
19 char kfree(void);
21 void testCustomArgumentlessAllocation(void) {
22 alloca(); // no-crash
23 malloc(); // no-crash
24 realloc(); // no-crash
25 kmalloc(); // no-crash
26 valloc(); // no-crash
27 calloc(); // no-crash
29 free(); // no-crash
30 kfree(); // no-crash