| /llvm-project-15.0.7/clang-tools-extra/test/clang-tidy/checkers/bugprone/ |
| H A D | suspicious-string-compare.c | 12 if (strcmp(A, "a")) in test_warning_patterns() 17 if (strcmp(A, "a") != 0 || in test_warning_patterns() 18 strcmp(A, "b")) in test_warning_patterns() 23 if (strcmp(A, "a") == 1) in test_warning_patterns() 27 if (strcmp(A, "a") == -1) in test_warning_patterns() 35 if (strcmp(A, "a") < 0.) in test_warning_patterns() 39 if (!strcmp(A, "a")) in test_warning_patterns() 46 if (strcmp(A, "a")) {} in test_structure_patterns() 64 if (strcmp(A, "a") == strcmp(A, "b")) return 0; in test_valid_patterns() 69 return strcmp(a, b); in wrapper() [all …]
|
| H A D | suspicious-string-compare.cpp | 62 if (strcmp(A, "a")) in test_warning_patterns() 68 strcmp(A, "b")) in test_warning_patterns() 73 if (strcmp(A, "a") == 1) in test_warning_patterns() 77 if (strcmp(A, "a") == -1) in test_warning_patterns() 85 if (strcmp(A, "a") < '0') in test_warning_patterns() 89 if (strcmp(A, "a") < 0.) in test_warning_patterns() 96 if (strcmp(A, "a") < 0) in test_valid_patterns() 98 if (strcmp(A, "a") == 0) in test_valid_patterns() 100 if (strcmp(A, "a") <= 0) in test_valid_patterns() 140 if (strcmp(A, "a")) in test_implicit_compare_with_functions() [all …]
|
| /llvm-project-15.0.7/llvm/tools/llvm-c-test/ |
| H A D | main.c | 68 if (argc == 2 && !strcmp(argv[1], "--lazy-new-module-dump")) { in main() 70 } else if (argc == 2 && !strcmp(argv[1], "--new-module-dump")) { in main() 72 } else if (argc == 2 && !strcmp(argv[1], "--lazy-module-dump")) { in main() 74 } else if (argc == 2 && !strcmp(argv[1], "--module-dump")) { in main() 78 } else if (argc == 2 && !strcmp(argv[1], "--module-list-globals")) { in main() 80 } else if (argc == 2 && !strcmp(argv[1], "--targets-list")) { in main() 84 } else if (argc == 2 && !strcmp(argv[1], "--object-list-symbols")) { in main() 86 } else if (argc == 2 && !strcmp(argv[1], "--disassemble")) { in main() 88 } else if (argc == 2 && !strcmp(argv[1], "--calc")) { in main() 92 } else if (argc == 2 && !strcmp(argv[1], "--set-metadata")) { in main() [all …]
|
| /llvm-project-15.0.7/compiler-rt/test/sanitizer_common/TestCases/ |
| H A D | max_allocation_size.cpp | 57 if (!strcmp(Action, "malloc")) in allocate() 59 if (!strcmp(Action, "calloc")) in allocate() 61 if (!strcmp(Action, "realloc")) in allocate() 70 if (!strcmp(Action, "new")) in allocate() 72 if (!strcmp(Action, "new-nothrow")) in allocate() 74 if (!strcmp(Action, "strndup")) { in allocate() 86 if (!strcmp(Action, "malloc") || !strcmp(Action, "calloc") || in deallocate() 87 !strcmp(Action, "realloc") || !strcmp(Action, "realloc-after-malloc") || in deallocate() 88 !strcmp(Action, "strndup")) in deallocate() 90 if (!strcmp(Action, "new")) in deallocate() [all …]
|
| H A D | allocator_returns_null.cpp | 64 if (!strcmp(action, "malloc")) { in main() 66 } else if (!strcmp(action, "calloc")) { in main() 68 } else if (!strcmp(action, "calloc-overflow")) { in main() 73 } else if (!strcmp(action, "realloc")) { in main() 75 } else if (!strcmp(action, "realloc-after-malloc")) { in main() 81 } else if (!strcmp(action, "new")) { in main() 83 } else if (!strcmp(action, "new-nothrow")) { in main()
|
| /llvm-project-15.0.7/libc/test/src/string/ |
| H A D | strcmp_test.cpp | 15 int result = __llvm_libc::strcmp(s1, s2); in TEST() 19 result = __llvm_libc::strcmp(s2, s1); in TEST() 32 result = __llvm_libc::strcmp(s3, empty); in TEST() 40 int result = __llvm_libc::strcmp(s1, s2); in TEST() 44 result = __llvm_libc::strcmp(s2, s1); in TEST() 51 int result = __llvm_libc::strcmp(s1, s2); in TEST() 56 result = __llvm_libc::strcmp(s2, s1); in TEST() 69 result = __llvm_libc::strcmp(s2, s1); in TEST() 82 result = __llvm_libc::strcmp(s2, s1); in TEST() 90 int result = __llvm_libc::strcmp(b, a); in TEST() [all …]
|
| /llvm-project-15.0.7/libc/AOR_v20.02/math/test/rtest/ |
| H A D | main.c | 117 if (!strcmp(str, specials[i].name) || in get_operand() 119 !strcmp(str+1, specials[i].name))) { in get_operand() 213 if (!strcmp(q, "func")) in dofile() 215 else if (!strcmp(q, "op1") || !strcmp(q, "op1r")) { in dofile() 218 } else if (!strcmp(q, "op2") || !strcmp(q, "op1i")) { in dofile() 227 } else if (!strcmp(q, "result") || !strcmp(q, "resultr")) { in dofile() 286 } else if (!strcmp(p, "-t")) { in main() 288 } else if (!strcmp(p, "-T")) { in main() 290 } else if (!strcmp(p, "-c")) { in main() 292 } else if (!strcmp(p, "--")) { in main() [all …]
|
| /llvm-project-15.0.7/compiler-rt/test/asan/TestCases/ |
| H A D | debug_locate.cpp | 27 assert(0 == strcmp(type, "global")); in main() 34 assert(0 == strcmp(type, "global")); in main() 40 assert(0 == strcmp(name, "local_var")); in main() 41 assert(0 == strcmp(type, "stack")); in main() 47 assert(0 == strcmp(name, "local_var")); in main() 48 assert(0 == strcmp(type, "stack")); in main() 54 assert(0 == strcmp(type, "heap")); in main() 60 assert(0 == strcmp(type, "heap")); in main() 71 assert((0 == strcmp(type, "high shadow")) || 0 == strcmp(type, "low shadow")); in main() 75 assert(0 == strcmp(type, "shadow gap")); in main()
|
| H A D | strtok.c | 48 assert(strcmp(token, "a") == 0); in test2() 96 if (!strcmp(argv[1], "test1")) test1(); in main() 97 if (!strcmp(argv[1], "test2")) test2(); in main() 98 if (!strcmp(argv[1], "test3")) test3(); in main() 99 if (!strcmp(argv[1], "test4")) test4(); in main() 100 if (!strcmp(argv[1], "test5")) test5(); in main() 101 if (!strcmp(argv[1], "test6")) test6(); in main()
|
| H A D | strtoll_strict.c | 97 if (!strcmp(argv[1], "test1")) test1(array, endptr); in main() 100 if (!strcmp(argv[1], "test2")) test2(array, endptr); in main() 103 if (!strcmp(argv[1], "test3")) test3(array0, endptr); in main() 106 if (!strcmp(argv[1], "test4")) test4(array, endptr); in main() 109 if (!strcmp(argv[1], "test5")) test5(array, endptr); in main() 112 if (!strcmp(argv[1], "test6")) test6(array, endptr); in main() 115 if (!strcmp(argv[1], "test7")) test7(array, endptr); in main()
|
| H A D | strtol_strict.c | 113 if (!strcmp(argv[1], "test1")) test1(array, endptr); in main() 116 if (!strcmp(argv[1], "test2")) test2(array, endptr); in main() 119 if (!strcmp(argv[1], "test3")) test3(array0, endptr); in main() 122 if (!strcmp(argv[1], "test4")) test4(array, endptr); in main() 125 if (!strcmp(argv[1], "test5")) test5(array, endptr); in main() 128 if (!strcmp(argv[1], "test6")) test6(array, endptr); in main() 131 if (!strcmp(argv[1], "test7")) test7(array, endptr); in main()
|
| /llvm-project-15.0.7/llvm/test/Transforms/InstCombine/ |
| H A D | strcmp-3.ll | 6 declare i32 @strcmp(i8*, i8*) 11 ; Fold strcmp(a5[0], a5[1]) to '1' - '1'. 20 %cmp = call i32 @strcmp(i8* %p, i8* %q) 36 %cmp = call i32 @strcmp(i8* %p, i8* %q) 41 ; Same as above but for strcmp(a5[I], a5[0]). 52 %cmp = call i32 @strcmp(i8* %p, i8* %q) 66 %cmp = call i32 @strcmp(i8* %p, i8* %q) 82 %cmp = call i32 @strcmp(i8* %p, i8* %q) 96 %cmp = call i32 @strcmp(i8* %p, i8* %q) 110 %cmp = call i32 @strcmp(i8* %p, i8* %q) [all …]
|
| H A D | strcmp-1.ll | 13 declare i32 @strcmp(i8*, i8*) 15 ; strcmp("", x) -> -*x 35 %temp1 = call i32 @strcmp(i8* %str1, i8* %str2) 40 ; strcmp(x, "") -> *x 57 %temp1 = call i32 @strcmp(i8* %str1, i8* %str2) 61 ; strcmp(x, y) -> cnst 73 %temp1 = call i32 @strcmp(i8* %str1, i8* %str2) 88 %temp1 = call i32 @strcmp(i8* %str1, i8* %str2) 92 ; strcmp(x, y) -> memcmp(x, y, <known length>) 116 ; strcmp(x,x) -> 0 [all …]
|
| /llvm-project-15.0.7/llvm/test/Transforms/InstCombine/ARM/ |
| H A D | strcmp.ll | 12 declare i32 @strcmp(i8*, i8*) 14 ; strcmp("", x) -> -*x 29 ; strcmp(x, "") -> *x 42 ; strcmp(x, y) -> cnst 65 ; strcmp(x, y) -> memcmp(x, y, <known length>) 82 ; strcmp(x,x) -> 0 92 ; strcmp("", x) -> -*x 107 ; strcmp(x, "") -> *x 120 ; strcmp(x, y) -> cnst 143 ; strcmp(x, y) -> memcmp(x, y, <known length>) [all …]
|
| /llvm-project-15.0.7/compiler-rt/test/hwasan/TestCases/ |
| H A D | allocator_returns_null.cpp | 59 if (!strcmp(action, "malloc")) { in main() 61 } else if (!strcmp(action, "calloc")) { in main() 63 } else if (!strcmp(action, "calloc-overflow")) { in main() 68 } else if (!strcmp(action, "realloc")) { in main() 70 } else if (!strcmp(action, "realloc-after-malloc")) { in main() 76 } else if (!strcmp(action, "new")) { in main() 78 } else if (!strcmp(action, "new-nothrow")) { in main()
|
| H A D | sizes.cpp | 39 bool test_size_max = argc == 3 && !strcmp(argv[2], "max"); in main() 47 if (!strcmp(argv[1], "malloc")) { in main() 50 } else if (!strcmp(argv[1], "calloc")) { in main() 55 } else if (!strcmp(argv[1], "reallocarray")) { in main() 60 } else if (!strcmp(argv[1], "new")) { in main() 63 } else if (!strcmp(argv[1], "new-nothrow")) { in main() 66 } else if (!strcmp(argv[1], "usable")) { in main()
|
| /llvm-project-15.0.7/llvm/lib/Target/NVPTX/MCTargetDesc/ |
| H A D | NVPTXInstPrinter.cpp | 103 if (strcmp(Modifier, "ftz") == 0) { in printCvtMode() 107 } else if (strcmp(Modifier, "sat") == 0) { in printCvtMode() 111 } else if (strcmp(Modifier, "relu") == 0) { in printCvtMode() 115 } else if (strcmp(Modifier, "base") == 0) { in printCvtMode() 160 if (strcmp(Modifier, "ftz") == 0) { in printCmpMode() 164 } else if (strcmp(Modifier, "base") == 0) { in printCmpMode() 233 if (!strcmp(Modifier, "volatile")) { in printLdStCode() 236 } else if (!strcmp(Modifier, "addsp")) { in printLdStCode() 258 } else if (!strcmp(Modifier, "sign")) { in printLdStCode() 269 } else if (!strcmp(Modifier, "vec")) { in printLdStCode() [all …]
|
| /llvm-project-15.0.7/lldb/source/Target/ |
| H A D | DynamicRegisterInfo.cpp | 521 if (strcmp(reg.name, "pc") == 0) in Finalize() 532 else if (strcmp(reg.name, "cpsr") == 0) in Finalize() 542 if ((strcmp(reg.name, "pc") == 0) || (strcmp(reg.name, "r15") == 0)) in Finalize() 556 else if (strcmp(reg.name, "fp") == 0) in Finalize() 558 else if (strcmp(reg.name, "cpsr") == 0) in Finalize() 565 if ((strcmp(reg.name, "eip") == 0) || (strcmp(reg.name, "pc") == 0)) in Finalize() 568 (strcmp(reg.name, "sp") == 0)) in Finalize() 571 (strcmp(reg.name, "fp") == 0)) in Finalize() 581 if ((strcmp(reg.name, "rip") == 0) || (strcmp(reg.name, "pc") == 0)) in Finalize() 584 (strcmp(reg.name, "sp") == 0)) in Finalize() [all …]
|
| /llvm-project-15.0.7/llvm/test/CodeGen/SystemZ/ |
| H A D | strcmp-nobuiltin.ll | 1 ; Test that strcmp won't be converted to CLST if calls are 6 declare signext i32 @strcmp(i8 *%src1, i8 *%src2) 12 ; CHECK: brasl %r14, strcmp 14 %res = call i32 @strcmp(i8 *%src1, i8 *%src2) nobuiltin 22 ; CHECK: brasl %r14, strcmp 24 %res = call i32 @strcmp(i8 *%src1, i8 *%src2) nobuiltin 41 ; CHECK: brasl %r14, strcmp 44 %res = call i32 @strcmp(i8 *%src1, i8 *%src2) nobuiltin
|
| /llvm-project-15.0.7/compiler-rt/test/scudo/ |
| H A D | sizes.cpp | 37 if (!strcmp(argv[1], "malloc")) { in main() 42 } else if (!strcmp(argv[1], "calloc")) { in main() 47 } else if (!strcmp(argv[1], "new")) { in main() 50 } else if (!strcmp(argv[1], "new-nothrow")) { in main() 53 } else if (!strcmp(argv[1], "usable")) { in main()
|
| H A D | sized-delete.cpp | 21 if (!strcmp(argv[1], "gooddel")) { in main() 25 if (!strcmp(argv[1], "baddel")) { in main() 29 if (!strcmp(argv[1], "gooddelarr")) { in main() 33 if (!strcmp(argv[1], "baddelarr")) { in main()
|
| H A D | interface.cpp | 23 if (!strcmp(argv[1], "ownership")) { in main() 29 if (!strcmp(argv[1], "ownership-and-size")) { in main() 43 if (!strcmp(argv[1], "heap-size")) { in main() 48 if (!strcmp(argv[1], "soft-limit")) { in main() 74 if (!strcmp(argv[1], "hard-limit")) { in main()
|
| /llvm-project-15.0.7/clang-tools-extra/docs/clang-tidy/checks/bugprone/ |
| H A D | suspicious-string-compare.rst | 13 if (strcmp(...)) // Implicitly compare to zero 14 if (!strcmp(...)) // Won't warn 15 if (strcmp(...) != 0) // Won't warn 17 Checks that compare function results (i.e., ``strcmp``) are compared to valid 30 if (strcmp(...) == -1) // Incorrect usage of the returned value. 38 if (strcmp(...) < 0.) // Incorrect usage of the returned value. 62 `lstrcmp`, `lstrcmpi`, `memcmp`, `memicmp`, `strcasecmp`, `strcmp`,
|
| /llvm-project-15.0.7/compiler-rt/test/asan/TestCases/Linux/ |
| H A D | allocator_oom_test.cpp | 58 if (!strcmp(action, "malloc")) { in main() 60 } else if (!strcmp(action, "calloc")) { in main() 62 } else if (!strcmp(action, "realloc")) { in main() 64 } else if (!strcmp(action, "realloc-after-malloc")) { in main()
|
| /llvm-project-15.0.7/libcxx/test/std/thread/futures/futures.future_error/ |
| H A D | what.pass.cpp | 32 LIBCPP_ASSERT(std::strcmp(f.what(), "The associated promise has been destructed prior " in main() 37 LIBCPP_ASSERT(std::strcmp(f.what(), "The future has already been retrieved from " in main() 42 LIBCPP_ASSERT(std::strcmp(f.what(), "The state of the promise has already been set.") == 0); in main() 46 LIBCPP_ASSERT(std::strcmp(f.what(), "Operation not permitted on an object without " in main()
|