Home
last modified time | relevance | path

Searched refs:strdup (Results 1 – 25 of 117) sorted by relevance

12345

/llvm-project/clang/test/Analysis/
H A Dpr22954.c10 char *strdup(const char *s);
25 a0.s2 = strdup("hello"); in f0()
39 a1.s2 = strdup("hello"); in f1()
53 a2.s2 = strdup("hello"); in f2()
67 a3.s2 = strdup("hello"); in f3()
91 b0.s2 = strdup("hello"); in f4()
92 b0.a.s2 = strdup("hola"); in f4()
113 a0.s2 = strdup("hello"); in f5()
121 a1.s2 = strdup("hello"); in f6()
129 a2.s2 = strdup("hello"); in f7()
[all …]
H A Dself-assign.cpp8 extern "C" char *strdup(const char* s);
22 StringUsed(const char *s = "") : str(strdup(s)) {} in StringUsed()
23 StringUsed(const StringUsed &rhs) : str(strdup(rhs.str)) {} in StringUsed()
45 str = strdup(rhs.str); // expected-warning{{Use of memory after it is freed}} in operator =()
70 StringUnused(const char *s = "") : str(strdup(s)) {} in StringUnused()
71 StringUnused(const StringUnused &rhs) : str(strdup(rhs.str)) {} in StringUnused()
93 str = strdup(rhs.str); // expected-warning{{Use of memory after it is freed}} in operator =()
H A Dunions.cpp5 extern "C" char *strdup(const char *s);
66 uu.s = strdup(""); in test()
72 uu.s = strdup(""); in testPositive()
88 uu.s = strdup(""); in testInvalidation()
H A Dredefined_system.c12 char strdup(void);
16 return memmove() + malloc() + system() + stdin() + memccpy() + free() + strdup() + atoi(); in foo()
H A Dmalloc.cpp46 char *strdup(const char *s);
136 char* getterName = strdup(name); in foo()
151 char* getterName = strdup(name); in fooNested()
H A Dobjc-boxing.m50 extern char *strdup(const char *str); function
57 return @(strdup("boxed dynamic string")); // expected-warning{{Potential memory leak}}
66 bs.str = strdup("dynamic string"); // The duped string shall be owned by val.
/llvm-project/llvm/lib/Target/
H A DTargetMachineC.cpp90 *ErrorMessage = strdup(Error.c_str()); in LLVMGetTargetFromTriple()
237 return strdup(StringRep.c_str()); in LLVMGetTargetMachineTriple()
242 return strdup(StringRep.c_str()); in LLVMGetTargetMachineCPU()
247 return strdup(StringRep.c_str()); in LLVMGetTargetMachineFeatureString()
314 *ErrorMessage = strdup(error.c_str()); in LLVMTargetMachineEmit()
331 *ErrorMessage = strdup(EC.message().c_str()); in LLVMTargetMachineEmitToFile()
353 return strdup(sys::getDefaultTargetTriple().c_str()); in LLVMGetDefaultTargetTriple()
357 return strdup(Triple::normalize(StringRef(triple)).c_str()); in LLVMNormalizeTargetTriple()
361 return strdup(sys::getHostCPUName().data()); in LLVMGetHostCPUName()
369 return strdup(Feature in LLVMGetHostCPUFeatures()
[all...]
/llvm-project/polly/lib/External/isl/
H A Disl_stream.c60 keyword->name = strdup(name); in isl_stream_register_keyword()
124 return strdup(tok->u.s); in isl_token_get_str()
452 tok->u.s = strdup("->"); in next_token()
509 tok->u.s = strdup(s->buffer); in next_token()
527 tok->u.s = strdup(s->buffer); in next_token()
536 tok->u.s = strdup("=="); in next_token()
551 tok->u.s = strdup(":="); in next_token()
566 tok->u.s = strdup(">="); in next_token()
571 tok->u.s = strdup(">>="); in next_token()
575 tok->u.s = strdup(">>"); in next_token()
[all …]
/llvm-project/libc/test/src/string/
H A Dstrdup_test.cpp1 //===-- Unittests for strdup ----------------------------------------------===//
10 #include "src/string/strdup.h"
17 char *result = LIBC_NAMESPACE::strdup(empty); in TEST()
30 char *result = LIBC_NAMESPACE::strdup(abc); in TEST()
41 char *result = LIBC_NAMESPACE::strdup(nullptr); in TEST()
/llvm-project/clang/test/SemaCXX/
H A D__try.cpp10 const char * strdup(const char *);
19 Exception(const char* s = "Unknown"){what = strdup(s); } in Exception()
20 Exception(const Exception& e ){what = strdup(e.what); } in Exception()
/llvm-project/llvm/test/Transforms/InstCombine/
H A Dstrndup.ll11 ; CHECK-NEXT: [[STRDUP:%.*]] = call dereferenceable_or_null(1) ptr @strdup(ptr nonnull @null)
29 ; CHECK-NEXT: [[STRDUP:%.*]] = call dereferenceable_or_null(6) ptr @strdup(ptr nonnull @hello)
38 ; CHECK-NEXT: [[STRDUP:%.*]] = call dereferenceable_or_null(6) ptr @strdup(ptr nonnull @hello)
47 ; CHECK-NEXT: [[STRDUP:%.*]] = call dereferenceable_or_null(6) ptr @strdup(ptr nonnull @hello)
H A Dbuiltin-object-size-strdup-family.ll10 declare noalias ptr @strdup(ptr);
21 %ptr = call noalias ptr @strdup(ptr noundef @str)
/llvm-project/clang/test/Analysis/cert/
H A Denv34-c-cert-examples.c22 char *strdup(const char*);
107 tmpvar = strdup(temp); in correct_usage_2()
117 tempvar = strdup(temp); in correct_usage_2()
/llvm-project/libc/src/string/
H A Dstrdup.cpp1 //===-- Implementation of strdup ------------------------------------------===//
9 #include "src/string/strdup.h"
20 LLVM_LIBC_FUNCTION(char *, strdup, (const char *src)) {
21 auto dup = internal::strdup(src);
H A Dstrdup.h1 //===-- Implementation header for strdup ------------------------*- C++ -*-===//
17 char *strdup(const char *src);
/llvm-project/compiler-rt/lib/fuzzer/
H A DFuzzerUtilDarwin.cpp104 strdup("sh"), in ExecuteCommand()
105 strdup("-c"), in ExecuteCommand()
106 strdup(CommandCStr), in ExecuteCommand()
/llvm-project/llvm/lib/ExecutionEngine/
H A DExecutionEngineBindings.cpp114 *OutError = strdup(Error.c_str()); in LLVMCreateExecutionEngineForModule()
129 *OutError = strdup(Error.c_str()); in LLVMCreateInterpreterForModule()
146 *OutError = strdup(Error.c_str()); in LLVMCreateJITCompilerForModule()
168 *OutError = strdup( in LLVMCreateMCJITCompilerForModule()
211 *OutError = strdup(Error.c_str()); in LLVMCreateMCJITCompilerForModule()
315 *OutError = strdup(ExecEngine->getErrorMessage().c_str()); in LLVMExecutionEngineGetErrMsg()
/llvm-project/lldb/examples/scripting/
H A Ddictionary.c61 new_node->word = strdup(word); in insert()
71 new_node->word = strdup(word); in insert()
89 char *new_word = (strdup(word)); in populate_dictionary()
/llvm-project/clang/test/Parser/
H A Dobjc-boxing.m9 extern char *strdup(const char *str); function
16 return @(strdup("boxed dynamic string"));
/llvm-project/compiler-rt/lib/memprof/
H A Dmemprof_interceptors.cpp214 INTERCEPTOR(char *, strdup, const char *s) { in INTERCEPTOR() argument
216 MEMPROF_INTERCEPTOR_ENTER(ctx, strdup); in INTERCEPTOR()
230 MEMPROF_INTERCEPTOR_ENTER(ctx, strdup); in INTERCEPTOR()
322 MEMPROF_INTERCEPT_FUNC(strdup); in InitializeMemprofInterceptors()
/llvm-project/llvm/test/Transforms/GlobalOpt/
H A Dcleanup-pointer-root-users.ll26 %call2 = call ptr @strdup(ptr %txt)
30 declare ptr @strdup(ptr)
/llvm-project/clang/test/Rewriter/
H A Dobjc-modern-boxing.mm6 extern char *strdup(const char *str); function
61 NSString *duplicateString = @(strdup("Hello"));
72 …_getClass("NSString"), sel_registerName("stringWithUTF8String:"), (const char *)(strdup("Hello")));
/llvm-project/llvm/test/Transforms/InferFunctionAttrs/
H A Dannotate-2.ll92 ; Expect char* strdup(const char*).
93 declare ptr @strdup(ptr, i64)
94 ; CHECK: declare ptr @strdup(ptr, i64)
/llvm-project/llvm/lib/Bitcode/Reader/
H A DBitReader.cpp48 *OutMessage = strdup(Message.c_str()); in LLVMParseBitcodeInContext()
94 *OutMessage = strdup(Message.c_str()); in LLVMGetBitcodeModuleInContext()
/llvm-project/compiler-rt/lib/asan/
H A Dasan_interceptors.cpp573 // Windows doesn't always define the strdup identifier,
579 # pragma push_macro("strdup")
580 # undef strdup
581 # define strdup _strdup macro
584 INTERCEPTOR(char*, strdup, const char *s) { argument
586 ASAN_INTERCEPTOR_ENTER(ctx, strdup);
607 ASAN_INTERCEPTOR_ENTER(ctx, strdup);
811 ASAN_INTERCEPT_FUNC(strdup);
909 # pragma pop_macro("strdup")

12345