| /llvm-project-15.0.7/llvm/test/Transforms/InstCombine/ |
| H A D | strndup.ll | 7 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 D | builtin-object-size-strdup-family.ll | 12 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 D | objsize.ll | 226 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 D | strndup_test.cpp | 16 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 D | CMakeLists.txt | 194 libc.src.string.strndup
|
| /llvm-project-15.0.7/clang/test/Analysis/ |
| H A D | malloc-interprocedural.c | 105 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 D | taint-generic.c | 101 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 D | malloc.c | 39 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 D | std-c-library-functions-POSIX.c | 149 char *strndup(const char *s, size_t n);
|
| /llvm-project-15.0.7/compiler-rt/test/asan/TestCases/Posix/ |
| H A D | strndup_oob_test2.cpp | 17 char *copy = strndup(kChars, 3); in main() 18 copy = strndup(kChars, 10); in main()
|
| H A D | strndup_oob_test.cpp | 17 char *copy = strndup(kString, 2); in main()
|
| /llvm-project-15.0.7/compiler-rt/lib/asan/tests/ |
| H A D | asan_str_test.cpp | 167 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 D | warn-memsize-comparison.cpp | 13 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 D | warn-memset-bad-sizeof.cpp | 173 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 D | strndup.h | 16 char *strndup(const char *src, size_t size);
|
| H A D | strndup.cpp | 20 LLVM_LIBC_FUNCTION(char *, strndup, (const char *src, size_t size)) {
|
| H A D | CMakeLists.txt | 191 strndup 193 strndup.cpp 195 strndup.h
|
| /llvm-project-15.0.7/compiler-rt/test/msan/ |
| H A D | strndup.cpp | 17 char *copy = strndup(kString, 4); // BOOM in main()
|
| H A D | scoped-interceptors.cpp | 26 char *copy = strndup(uninit, sizeof(uninit)); // BOOM in main()
|
| /llvm-project-15.0.7/clang/test/Sema/ |
| H A D | builtins-gnu-mode.c | 9 int strndup; variable
|
| /llvm-project-15.0.7/compiler-rt/test/sanitizer_common/TestCases/ |
| H A D | max_allocation_size.cpp | 80 return strndup(pstr, Size); in allocate()
|
| /llvm-project-15.0.7/compiler-rt/test/sanitizer_common/TestCases/Posix/ |
| H A D | funopen.cpp | 32 char *data = strndup(buf, len); in f_write()
|
| /llvm-project-15.0.7/compiler-rt/test/sanitizer_common/TestCases/NetBSD/ |
| H A D | funopen2.cpp | 34 char *data = strndup((char*)buf, len); in f_write()
|
| /llvm-project-15.0.7/libc/docs/ |
| H A D | strings.rst | 77 strndup YES
|
| /llvm-project-15.0.7/clang/test/CodeGen/ |
| H A D | builtins.c | 97 V(strndup, (s0, n)); in main()
|