Home
last modified time | relevance | path

Searched refs:strndup (Results 1 – 25 of 40) sorted by relevance

12

/llvm-project-15.0.7/llvm/test/Transforms/InstCombine/
H A Dstrndup.ll7 declare i8* @strndup(i8*, i32)
15 %ret = call i8* @strndup(i8* %src, i32 0)
21 ; CHECK-NEXT: [[RET:%.*]] = call dereferenceable_or_null(5) i8* @strndup(i8* dereferenceable(6) …
25 %ret = call i8* @strndup(i8* %src, i32 4)
35 %ret = call i8* @strndup(i8* %src, i32 5)
45 %ret = call i8* @strndup(i8* %src, i32 6)
55 %ret = call i8* @strndup(i8* %src, i32 7)
61 ; CHECK-NEXT: [[RET:%.*]] = call i8* @strndup(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @h…
65 %ret = call i8* @strndup(i8* %src, i32 %n)
H A Dbuiltin-object-size-strdup-family.ll12 declare noalias i8* @strndup(i8*, i64);
39 …%ptr = call noalias i8* @strndup(i8* noundef getelementptr inbounds ([11 x i8], [11 x i8]* @str, i…
H A Dobjsize.ll226 declare noalias i8* @strndup(i8* nocapture, i32) nounwind
242 ; CHECK-NEXT: [[CALL:%.*]] = tail call dereferenceable_or_null(4) i8* @strndup(i8* dereferenceab…
246 …%call = tail call i8* @strndup(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0…
258 …%call = tail call i8* @strndup(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0…
270 …%call = tail call i8* @strndup(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0…
282 …%call = tail call i8* @strndup(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0…
/llvm-project-15.0.7/libc/test/src/string/
H A Dstrndup_test.cpp16 char *result = __llvm_libc::strndup(empty, 1); in TEST()
26 char *result = __llvm_libc::strndup(abc, 3); in TEST()
33 result = __llvm_libc::strndup(abc, 1); in TEST()
40 result = __llvm_libc::strndup(abc, 10); in TEST()
49 char *result = __llvm_libc::strndup(nullptr, 0); in TEST()
H A DCMakeLists.txt194 libc.src.string.strndup
/llvm-project-15.0.7/clang/test/Analysis/
H A Dmalloc-interprocedural.c105 char *strndup(const char *str, size_t n) { in strndup() function
126 (void)strndup(0, 20); // no-warning in useStrndup()
129 (void)strndup("hi there", n); // no-warning in useStrndup()
132 (void)strndup("hi there", n); in useStrndup()
H A Dtaint-generic.c101 char *strndup(const char *s, size_t n);
187 dup = strndup(s, 20); in testUncontrolledFormatString()
849 char *strndup(const char *s, size_t n);
854 char *result = strndup(s, n); in testStrndup()
H A Dmalloc.c39 char *strndup(const char *s, size_t n);
440 char *y = strndup(x, 4); // expected-warning{{Use of memory after it is freed}} in f8()
1138 char *s2 = strndup(s, size); in testStrndup()
H A Dstd-c-library-functions-POSIX.c149 char *strndup(const char *s, size_t n);
/llvm-project-15.0.7/compiler-rt/test/asan/TestCases/Posix/
H A Dstrndup_oob_test2.cpp17 char *copy = strndup(kChars, 3); in main()
18 copy = strndup(kChars, 10); in main()
H A Dstrndup_oob_test.cpp17 char *copy = strndup(kString, 2); in main()
/llvm-project-15.0.7/compiler-rt/lib/asan/tests/
H A Dasan_str_test.cpp167 new_str = strndup(str, size - 13); in TEST()
169 new_str = strndup(str + size - 1, 13); in TEST()
172 EXPECT_DEATH(Ident(strndup(str - 1, 13)), LeftOOBReadMessage(1)); in TEST()
173 EXPECT_DEATH(Ident(strndup(str + size, 13)), RightOOBReadMessage(0)); in TEST()
176 EXPECT_DEATH(Ident(strndup(str, size + 13)), RightOOBReadMessage(0)); in TEST()
178 Ident(new_str = strndup(str + size - 1, 0)); in TEST()
180 Ident(new_str = strndup(str + size - 1, 1)); in TEST()
182 EXPECT_DEATH(Ident(strndup(str + size - 1, 2)), RightOOBReadMessage(0)); in TEST()
/llvm-project-15.0.7/clang/test/SemaCXX/
H A Dwarn-memsize-comparison.cpp13 extern "C" char *strndup(const char *src, size_t n);
69 if (strndup(b1, sizeof(b1) != 0)) {} // \ in f()
73 if (strndup(b1, sizeof(b1)) != 0) {} in f()
H A Dwarn-memset-bad-sizeof.cpp173 extern "C" char *strndup(const char *src, unsigned n);
188 strndup(FOO, sizeof(FOO)); // \ in strcpy_and_friends()
/llvm-project-15.0.7/libc/src/string/
H A Dstrndup.h16 char *strndup(const char *src, size_t size);
H A Dstrndup.cpp20 LLVM_LIBC_FUNCTION(char *, strndup, (const char *src, size_t size)) {
H A DCMakeLists.txt191 strndup
193 strndup.cpp
195 strndup.h
/llvm-project-15.0.7/compiler-rt/test/msan/
H A Dstrndup.cpp17 char *copy = strndup(kString, 4); // BOOM in main()
H A Dscoped-interceptors.cpp26 char *copy = strndup(uninit, sizeof(uninit)); // BOOM in main()
/llvm-project-15.0.7/clang/test/Sema/
H A Dbuiltins-gnu-mode.c9 int strndup; variable
/llvm-project-15.0.7/compiler-rt/test/sanitizer_common/TestCases/
H A Dmax_allocation_size.cpp80 return strndup(pstr, Size); in allocate()
/llvm-project-15.0.7/compiler-rt/test/sanitizer_common/TestCases/Posix/
H A Dfunopen.cpp32 char *data = strndup(buf, len); in f_write()
/llvm-project-15.0.7/compiler-rt/test/sanitizer_common/TestCases/NetBSD/
H A Dfunopen2.cpp34 char *data = strndup((char*)buf, len); in f_write()
/llvm-project-15.0.7/libc/docs/
H A Dstrings.rst77 strndup YES
/llvm-project-15.0.7/clang/test/CodeGen/
H A Dbuiltins.c97 V(strndup, (s0, n)); in main()

12