Home
last modified time | relevance | path

Searched refs:calloc (Results 1 – 25 of 170) sorted by relevance

1234567

/llvm-project-15.0.7/llvm/test/Transforms/DeadStoreElimination/
H A Dcalloc-store.ll7 %1 = tail call noalias i8* @calloc(i64 1, i64 4)
17 %1 = tail call noalias i8* @calloc(i64 1, i64 4)
35 %1 = tail call noalias i8* @calloc(i64 1, i64 4)
44 %1 = tail call noalias i8* @calloc(i64 1, i64 4)
53 %1 = tail call noalias i8* @calloc(i64 1, i64 4)
61 %1 = tail call noalias i8* @calloc(i64 1, i64 4)
70 %p = tail call noalias i8* @calloc(i64 1, i64 4)
87 %p = tail call noalias i8* @calloc(i64 1, i64 4)
106 %p = tail call noalias i8* @calloc(i64 1, i64 4)
123 %p = tail call noalias i8* @calloc(i64 1, i64 4)
[all …]
H A Dnoop-stores.ll382 ; CHECK-LABEL: @calloc(
461 ; This should not create a calloc
503 %call = tail call i8* @calloc(i64 10000, i64 4)
514 %call = tail call i8* @calloc(i64 10000, i64 4)
524 %call = tail call i8* @calloc(i64 10000, i64 4)
535 %call = tail call i8* @calloc(i64 10000, i64 4)
547 %call = tail call i8* @calloc(i64 10000, i64 4)
559 %call = tail call i8* @calloc(i64 10000, i64 4)
574 %call = tail call i8* @calloc(i64 10000, i64 4)
597 %call = tail call i8* @calloc(i64 10000, i64 4)
[all …]
/llvm-project-15.0.7/clang/test/Analysis/
H A Dmalloc-sizeof.c6 void *calloc(size_t nmemb, size_t size);
22 struct A *ap1 = calloc(1, sizeof(struct A)); in foo()
23 struct A *ap2 = calloc(2, sizeof(*ap1)); in foo()
24 …struct A *ap3 = calloc(2, sizeof(ap1)); // expected-warning {{Result of 'calloc' is converted to a… in foo()
25 …struct A *ap4 = calloc(3, sizeof(struct A*)); // expected-warning {{Result of 'calloc' is converte… in foo()
26 …struct A *ap5 = calloc(4, sizeof(struct B)); // expected-warning {{Result of 'calloc' is converted… in foo()
H A Dmalloc-bodyfarms.c4 void *calloc(size_t, size_t);
12 calloc(1, 1); in test_no_state_change_in_body_farm()
16 void *p = calloc(1, 1); in test_no_state_change_in_body_farm_2()
H A Dmalloc-sizeof.cpp6 void *calloc(size_t nmemb, size_t size);
20 …A *x = static_cast<A*>(calloc(10, sizeof(void*))); // expected-warning {{Result of 'calloc' is con… in bar()
22 A **y = static_cast<A**>(calloc(10, sizeof(void*))); // no-warning in bar()
H A Dmalloc-annotations.c12 void *calloc(size_t nmemb, size_t size);
247 char *buf = calloc(2,2); in callocNoFree()
253 char *buf = calloc(2,2); in callocZeroesGood()
262 char *buf = calloc(2,2); in callocZeroesBad()
H A Dmalloc-custom.c16 char calloc(void);
27 calloc(); // no-crash in testCustomArgumentlessAllocation()
H A Dunix-fns.c17 void *calloc(size_t, size_t);
137 …char *foo = calloc(0, 42); // expected-warning{{Call to 'calloc' has an allocation size of 0 bytes… in test_calloc()
143 …char *foo = calloc(42, 0); // expected-warning{{Call to 'calloc' has an allocation size of 0 bytes… in test_calloc2()
149 char *foo = calloc(nmemb, size); // no-warning in test_calloc_nowarn()
/llvm-project-15.0.7/clang/test/Sema/
H A Dextern-redecl.c49 extern float *calloc(void); // expected-warning {{incompatible redeclaration of library function}} …
53 int *calloc(void); // expected-error {{conflicting types}} in test5a()
58 int *calloc(void); // expected-error {{conflicting types}} in test5b()
63 float *(*_calloc)() = &calloc; in test5c()
H A Dimplicit-builtin-redecl.c9 void *calloc(int, int, int); // expected-warning{{incompatible redeclaration of library function 'c…
13 calloc(0, 0, 0); in f1()
H A Dimplicit-builtin-decl.c11 int *calloc(__SIZE_TYPE__, __SIZE_TYPE__); // expected-warning{{incompatible redeclaration of libra…
16 int calloc = 1; in g() local
/llvm-project-15.0.7/llvm/test/Transforms/InstCombine/
H A Dcalloc-mismatch.ll4 ; The argument types should match if it is the standard library calloc.
7 declare i8* @calloc(i64, i32)
11 ; CHECK-NEXT: [[CALL:%.*]] = call i8* @calloc(i64 1, i32 1)
14 %call = call i8* @calloc(i64 1, i32 1)
H A Dderef-alloc-fns.ll196 %call = tail call noalias i8* @calloc(i64 1, i64 %n)
205 %call = tail call noalias i8* @calloc(i64 %n, i64 0)
214 %call = tail call noalias i8* @calloc(i64 %n, i64 %n)
220 ; CHECK-NEXT: [[CALL:%.*]] = tail call noalias i8* @calloc(i64 0, i64 0)
223 %call = tail call noalias i8* @calloc(i64 0, i64 0)
232 %call = tail call noalias i8* @calloc(i64 %n, i64 0)
242 %call = tail call noalias i8* @calloc(i64 0, i64 %n)
248 ; CHECK-NEXT: [[CALL:%.*]] = tail call noalias i8* @calloc(i64 0, i64 1)
251 %call = tail call noalias i8* @calloc(i64 0, i64 1)
260 %call = tail call noalias i8* @calloc(i64 1, i64 0)
[all …]
/llvm-project-15.0.7/llvm/test/Transforms/GVN/
H A Dcalloc-load-removal.ll2 ; Check that loads from calloc are recognized as being zero.
8 %1 = tail call noalias i8* @calloc(i64 1, i64 4)
26 %mem = invoke noalias i8* @calloc(i64 1, i64 4)
48 declare noalias i8* @calloc(i64, i64) allockind("alloc,zeroed") allocsize(0,1)
/llvm-project-15.0.7/llvm/test/CodeGen/Thumb2/
H A Dbti-const-island.mir13 declare noalias i8* @calloc(i32, i32)
24 %1 = call noalias i8* @calloc(i32 20, i32 1)
28 %2 = call noalias i8* @calloc(i32 14, i32 1)
32 %3 = call noalias i8* @calloc(i32 17, i32 1)
109 …; CHECK: tBL 14 /* CC::al */, $noreg, @calloc, csr_aapcs, implicit-def dead $lr, implicit $sp, i…
115 …; CHECK: tBL 14 /* CC::al */, $noreg, @calloc, csr_aapcs, implicit-def dead $lr, implicit $sp, i…
120 …; CHECK: tBL 14 /* CC::al */, $noreg, @calloc, csr_aapcs, implicit-def dead $lr, implicit $sp, i…
152 …tBL 14 /* CC::al */, $noreg, @calloc, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit $r0…
160 …tBL 14 /* CC::al */, $noreg, @calloc, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit $r0…
166 …tBL 14 /* CC::al */, $noreg, @calloc, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit $r0…
H A Dthumb2-tbh.ll22 declare noalias i8* @calloc(i32, i32) nounwind
63 %2 = call noalias i8* @calloc(i32 21, i32 1) nounwind ; <i8*> [#uses=0]
70 %5 = call noalias i8* @calloc(i32 22, i32 1) nounwind ; <i8*> [#uses=0]
74 %6 = call noalias i8* @calloc(i32 20, i32 1) nounwind ; <i8*> [#uses=0]
78 %7 = call noalias i8* @calloc(i32 14, i32 1) nounwind ; <i8*> [#uses=0]
/llvm-project-15.0.7/llvm/test/Transforms/NewGVN/
H A Dcalloc-load-removal.ll2 ; Check that loads from calloc are recognized as being zero.
8 %1 = tail call noalias i8* @calloc(i64 1, i64 4)
19 declare noalias i8* @calloc(i64, i64) mustprogress nofree nounwind willreturn allockind("alloc,zero…
/llvm-project-15.0.7/compiler-rt/lib/asan/
H A Dasan_malloc_linux.cpp73 INTERCEPTOR(void*, calloc, uptr nmemb, uptr size) { in INTERCEPTOR() argument
172 void *(*calloc)(uptr n_elements, uptr elem_size); member
179 void *(*calloc)(uptr n_elements, uptr elem_size); member
192 WRAP(malloc), WRAP(free), WRAP(calloc),
196 WRAP(calloc), WRAP(free), WRAP(mallinfo),
H A Dasan_malloc_win.cpp113 void *calloc(size_t nmemb, size_t size) { in calloc() function
120 return calloc(nmemb, size); in _calloc_base()
125 return calloc(nmemb, size); in _calloc_dbg()
130 return calloc(nmemb, size); in _calloc_impl()
153 return calloc(n, elem_size); in _recalloc()
496 TryToOverrideFunction("calloc", (uptr)calloc); in ReplaceSystemMalloc()
497 TryToOverrideFunction("_calloc_base", (uptr)calloc); in ReplaceSystemMalloc()
498 TryToOverrideFunction("_calloc_crt", (uptr)calloc); in ReplaceSystemMalloc()
/llvm-project-15.0.7/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/
H A Downing-memory-legacy-functions.cpp18 void *calloc(size_t Count, size_t SizeSingle);
38 using ::calloc;
136 void *HeapPointer5 = calloc(10ul, 4ul); in test_resource_creators()
138 gsl::owner<void *> HeapPointer6 = calloc(10ul, 4ul); // Ok in test_resource_creators()
H A Dno-malloc.cpp6 void *calloc(size_t num, size_t size);
14 int *zeroed = (int *)calloc(20, sizeof(int)); in malloced_array()
H A Dno-malloc-custom.cpp12 void *calloc(size_t num, size_t size);
22 int *zeroed = (int *)calloc(20, sizeof(int)); in malloced_array()
/llvm-project-15.0.7/compiler-rt/test/tsan/
H A Dmalloc_overflow.cpp13 p = calloc((size_t)-1, (size_t)-1); in main()
16 p = calloc((size_t)-1 / 2, (size_t)-1 / 2); in main()
/llvm-project-15.0.7/compiler-rt/test/cfi/cross-dso/
H A Dtarget_out_of_bounds.cpp46 void *vtable = calloc(1, 128); in main()
57 void *vtable = calloc(1, 128); in main()
/llvm-project-15.0.7/clang/test/CodeGen/
H A Dallocs-fns-allocsize.c6 void *calloc(size_t, size_t);
16 return calloc(e, n); in calloc_test()

1234567