| /llvm-project-15.0.7/clang-tools-extra/test/clang-tidy/checkers/readability/ |
| H A D | string-compare.cpp | 32 std::string str1("a", 1); in Test() local 35 if (str1.compare(str2)) { in Test() 38 if (!str1.compare(str2)) { in Test() 41 if (str1.compare(str2) == 0) { in Test() 61 func(str1.compare(str2)); in Test() 67 std::string *str3 = &str1; in Test() 87 if (str1.compare(comp())) { in Test() 93 std::string str1("a", 1); in Valid() local 95 if (str1 == str2) { in Valid() 97 if (str1 != str2) { in Valid() [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/docs/clang-tidy/checks/readability/ |
| H A D | string-compare.rst | 21 std::string str1{"a"}; 24 // use str1 != str2 instead. 25 if (str1.compare(str2)) { 28 // use str1 == str2 instead. 29 if (!str1.compare(str2)) { 32 // use str1 == str2 instead. 33 if (str1.compare(str2) == 0) { 36 // use str1 != str2 instead. 40 // use str1 == str2 instead. 44 // use str1 != str2 instead. [all …]
|
| /llvm-project-15.0.7/compiler-rt/test/dfsan/ |
| H A D | custom.cpp | 207 int rv = memcmp(str1, str2, sizeof(str1)); in test_memcmp() 216 rv = memcmp(str1, str2, sizeof(str1) - 2); in test_memcmp() 226 int rv = bcmp(str1, str2, sizeof(str1)); in test_bcmp() 235 rv = bcmp(str1, str2, sizeof(str1) - 2); in test_bcmp() 250 void *r = memcpy(ptr2, str1, sizeof(str1)); in test_memcpy() 253 assert(0 == memcmp(str2, str1, sizeof(str1))); in test_memcpy() 317 rv = strcmp(str1, str1); in test_strcmp() 444 int rv = strncmp(str1, str2, sizeof(str1)); in test_strncmp() 461 rv = strncmp(str1, str1, 4); in test_strncmp() 515 int rv = strncasecmp(str1, str2, sizeof(str1)); in test_strncasecmp() [all …]
|
| /llvm-project-15.0.7/llvm/test/Transforms/InstCombine/ |
| H A D | strncmp-1.ll | 24 %temp1 = call i32 @strncmp(i8* %str1, i8* %str2, i32 10) 29 define i32 @test2(i8* %str1) { 37 %temp1 = call i32 @strncmp(i8* %str1, i8* %str2, i32 10) 49 %temp1 = call i32 @strncmp(i8* %str1, i8* %str2, i32 10) 71 %temp1 = call i32 @strncmp(i8* %str1, i8* %str2, i32 4) 76 define i32 @test6(i8* %str1, i8* %str2) { 86 %temp1 = call i32 @strncmp(i8* %str1, i8* %str2, i32 1) 91 define i32 @test7(i8* %str1, i8* %str2) { 111 define i32 @test9(i8* %str1, i8* %str2, i32 %n) { 122 define i32 @test10(i8* %str1, i8* %str2, i32 %n) { [all …]
|
| H A D | strcmp-1.ll | 34 %str1 = getelementptr inbounds [1 x i8], [1 x i8]* @null, i32 0, i32 0 35 %temp1 = call i32 @strcmp(i8* %str1, i8* %str2) 41 define i32 @test2(i8* %str1) { 57 %temp1 = call i32 @strcmp(i8* %str1, i8* %str2) 71 %str1 = getelementptr inbounds [5 x i8], [5 x i8]* @hell, i32 0, i32 0 73 %temp1 = call i32 @strcmp(i8* %str1, i8* %str2) 86 %str1 = getelementptr inbounds [5 x i8], [5 x i8]* @hell, i32 0, i32 0 88 %temp1 = call i32 @strcmp(i8* %str1, i8* %str2) 108 %str1 = getelementptr inbounds [6 x i8], [6 x i8]* @hello, i32 0, i32 0 112 %temp3 = call i32 @strcmp(i8* %str1, i8* %str2) [all …]
|
| H A D | weak-symbols.ll | 16 %str1 = getelementptr inbounds [2 x i8], [2 x i8]* @fake_init, i64 0, i64 0 18 %temp1 = call i32 @strcmp(i8* %str1, i8* %str2) nounwind readonly 27 %str1 = getelementptr inbounds [2 x i8], [2 x i8]* @real_init, i64 0, i64 0 29 %temp1 = call i32 @strcmp(i8* %str1, i8* %str2) nounwind readonly
|
| H A D | strncat-2.ll | 62 define i8* @test1(i8* %str1, i8* %str2, i32 %n) { 68 %temp1 = call i8* @strncat(i8* nonnull %str1, i8* nonnull %str2, i32 %n) 73 define i8* @test2(i8* %str1, i8* %str2, i32 %n) { 78 %temp1 = call i8* @strncat(i8* %str1, i8* %str2, i32 0) 83 define i8* @test3(i8* %str1, i8* %str2, i32 %n) { 89 %temp1 = call i8* @strncat(i8* %str1, i8* %str2, i32 5) 93 define i8* @test4(i8* %str1, i8* %str2, i32 %n) null_pointer_is_valid { 99 %temp1 = call i8* @strncat(i8* %str1, i8* %str2, i32 %n)
|
| /llvm-project-15.0.7/llvm/test/CodeGen/X86/ |
| H A D | memcmp-constant.ll | 4 @.str1 = private constant [4 x i8] c"\00\00\00\00", align 1 14 %m = tail call i32 @memcmp(ptr @.str1, ptr @.str1, i64 4) nounwind 23 %m = tail call i32 @memcmp(ptr @.str1, ptr @.str1, i64 4) nounwind 33 %m = tail call i32 @memcmp(ptr @.str1, ptr @.str1, i64 4) nounwind 43 %m = tail call i32 @memcmp(ptr @.str1, ptr @.str1, i64 4) nounwind 53 %m = tail call i32 @memcmp(ptr @.str1, ptr @.str1, i64 4) nounwind 64 %m = tail call i32 @memcmp(ptr @.str1, ptr @.str2, i64 4) nounwind 73 %m = tail call i32 @memcmp(ptr @.str1, ptr @.str2, i64 4) nounwind 83 %m = tail call i32 @memcmp(ptr @.str1, ptr @.str2, i64 4) nounwind 93 %m = tail call i32 @memcmp(ptr @.str1, ptr @.str2, i64 4) nounwind [all …]
|
| H A D | switch-crit-edge-constant.ll | 4 ; CHECK: {{mov.*str1}} 5 ; CHECK-NOT: {{mov.*str1}} 9 @str1 = internal constant [5 x i8] c"bonk\00" ; <ptr> [#uses=1] 37 …str1, %entry ], [ @str1, %entry ], [ @str1, %entry ], [ @str1, %entry ], [ @str1, %entry ], [ @str…
|
| /llvm-project-15.0.7/libcxx/test/std/re/re.const/re.matchflag/ |
| H A D | match_prev_avail.pass.cpp | 22 char str1[] = "\na"; in main() local 23 auto str1_scnd = str1 + 1; in main() 26 assert(std::regex_match(str1 + 1, str1 + 2, std::regex("^a"), in main() 35 assert(std::regex_search(str1, std::regex("\\ba"))); in main() 36 assert(std::regex_match(str1 + 1, str1 + 2, std::regex("\\ba\\b"), in main() 44 assert(std::regex_match(str1 + 1, str1 + 2, std::regex("^a"), in main()
|
| /llvm-project-15.0.7/llvm/test/MC/ELF/ |
| H A D | basic-elf-32.s | 10 movl $.L.str1, (%esp) 20 .type .L.str1,@object # @.str1 21 .section .rodata.str1.1,"aMS",@progbits,1 22 .L.str1: 24 .size .L.str1, 6
|
| H A D | entsize.s | 6 .section .rodata.str1.1,"aMS",@progbits,1 8 .type .L.str1,@object # @.str1 9 .L.str1: 11 .size .L.str1, 6
|
| H A D | basic-elf-64.s | 10 movl $.L.str1, %edi 52 .type .L.str1,@object # @.str1 53 .section .rodata.str1.1,"aMS",@progbits,1 54 .L.str1: 56 .size .L.str1, 6
|
| /llvm-project-15.0.7/llvm/test/Transforms/InstCombine/ARM/ |
| H A D | strcmp.ll | 24 %temp1 = call arm_apcscc i32 @strcmp(i8* %str1, i8* %str2) 30 define arm_aapcscc i32 @test2(i8* %str1) { 38 %temp1 = call arm_aapcscc i32 @strcmp(i8* %str1, i8* %str2) 50 %temp1 = call arm_aapcscc i32 @strcmp(i8* %str1, i8* %str2) 61 %temp1 = call arm_aapcscc i32 @strcmp(i8* %str1, i8* %str2) 78 %temp3 = call arm_aapcscc i32 @strcmp(i8* %str1, i8* %str2) 102 %temp1 = call arm_aapcs_vfpcc i32 @strcmp(i8* %str1, i8* %str2) 108 define arm_aapcs_vfpcc i32 @test2_vfp(i8* %str1) { 116 %temp1 = call arm_aapcs_vfpcc i32 @strcmp(i8* %str1, i8* %str2) 128 %temp1 = call arm_aapcs_vfpcc i32 @strcmp(i8* %str1, i8* %str2) [all …]
|
| /llvm-project-15.0.7/llvm/test/MC/Mips/ |
| H A D | elf-relsym.s | 51 lw $2, %got($.str1)($1) 52 addiu $2, $2, %lo($.str1) 76 .section .rodata.str1.1,"aMS",@progbits,1 81 .type $.str1,@object # @.str1 82 $.str1: 84 .size $.str1, 5
|
| /llvm-project-15.0.7/clang-tools-extra/test/clang-tidy/checkers/bugprone/ |
| H A D | not-null-terminated-result-in-initialization-strlen.c | 39 int bad_strncmp_1(char *str1, const char *str2) { in bad_strncmp_1() argument 40 int length = strlen(str1) + 1; in bad_strncmp_1() 41 return strncmp(str1, str2, length); in bad_strncmp_1() 46 int good_strncmp_1(char *str1, const char *str2) { in good_strncmp_1() argument 47 int length = strlen(str1) + 1; in good_strncmp_1() 48 return strncmp(str1, str2, length - 1); in good_strncmp_1()
|
| /llvm-project-15.0.7/llvm/test/CodeGen/AArch64/ |
| H A D | aarch64-checkMergeStoreCandidatesForDependencies.ll | 13 ; t7: i64,ch = load<(load (s64) from `%str1** undef`, align 1)> t6, undef:i64, undef:i64 36 %str1 = type { i64, %str1* } 55 %l0 = load %str1*, %str1** undef, align 1 56 %lp0 = getelementptr inbounds %str1, %str1* %l0, i32 0, i32 1 57 %l1 = load %str1*, %str1** %lp0, align 1 58 %lp1 = getelementptr inbounds %str1, %str1* %l1, i32 0, i32 0
|
| /llvm-project-15.0.7/llvm/test/MC/X86/AlignedBundling/ |
| H A D | rodata-section.s | 12 movl $.str1, 4(%esp) 22 .type .str1,@object 23 .str1: label 25 .size .str1, 7
|
| /llvm-project-15.0.7/flang/test/Semantics/ |
| H A D | resolve93.f90 | 4 character(10) str1 local 11 print *, str1(1:9), str1(7)
|
| /llvm-project-15.0.7/lld/test/ELF/ |
| H A D | gc-sections-merge-implicit-addend.s | 28 .long .rodata.str1.1 + 4 34 .long .rodata.str1.1 36 .section .rodata.str1.1,"aMS",@progbits,1
|
| H A D | gc-sections-merge-addend.s | 28 .quad .rodata.str1.1 + 4 34 .quad .rodata.str1.1 36 .section .rodata.str1.1,"aMS",@progbits,1
|
| /llvm-project-15.0.7/lldb/test/API/lang/objc/sample/ |
| H A D | main.m | 55 NSString *str1 = myStr.string; 58 NSArray *array = [NSArray arrayWithObjects: str1, str2, str3, nil]; 60 str1, @"1", 66 id str_id = str1;
|
| /llvm-project-15.0.7/lldb/test/API/lang/objcxx/sample/ |
| H A D | main.mm | 55 NSString *str1 = myStr.string; 58 NSArray *array = [NSArray arrayWithObjects: str1, str2, str3, nil]; 60 str1, @"1", 66 id str_id = str1;
|
| /llvm-project-15.0.7/llvm/test/Object/X86/ |
| H A D | objdump-disassembly-inline-relocations.test | 81 # ELF-i386: e: R_386_32 .rodata.str1.1 101 - Name: .rodata.str1.1 108 Symbol: .rodata.str1.1 117 - Name: .rodata.str1.1 119 Section: .rodata.str1.1 143 - Name: .rodata.str1.1 150 Symbol: .rodata.str1.1 161 - Name: .rodata.str1.1 163 Section: .rodata.str1.1 179 # ELF-x86-64: d: R_X86_64_32S .rodata.str1.1
|
| /llvm-project-15.0.7/llvm/test/MC/COFF/ |
| H A D | symbol-fragment-offset-64.s | 18 movl $.L_.str1, (%esp) 30 .L_.str1: # @.str1
|