/llvm-project/clang-tools-extra/test/clang-tidy/checkers/abseil/ |
H A D | string-find-startswith.cpp | 1 // RUN: %check_clang_tidy -std=c++17 %s abseil-string-find-startswith %t -- \ 3 // RUN: {abseil-string-find-startswith.StringLikeClasses: \ 31 …ESSAGES: :[[@LINE-1]]:3: warning: use absl::StartsWith instead of find() == 0 [abseil-string-find-… in tests() 32 // CHECK-FIXES: {{^[[:space:]]*}}absl::StartsWith(s, "a");{{$}} in tests() 35 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use absl::StartsWith in tests() 36 // CHECK-FIXES: {{^[[:space:]]*}}absl::StartsWith(s, s);{{$}} in tests() 39 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use !absl::StartsWith in tests() 40 // CHECK-FIXES: {{^[[:space:]]*}}!absl::StartsWith(s, "aaa");{{$}} in tests() 43 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use !absl::StartsWith in tests() 44 // CHECK-FIXES: {{^[[:space:]]*}}!absl::StartsWith(s, foo(foo(bar())));{{$}} in tests() [all …]
|
/llvm-project/llvm/lib/BinaryFormat/ |
H A D | Magic.cpp | 28 static bool startswith(StringRef Magic, const char (&S)[N]) { in startswith() function 39 if (startswith(Magic, "\0\0\xFF\xFF")) { in identify_magic() 59 if (startswith(Magic, "\0asm")) in identify_magic() 66 if (startswith(Magic, "\x01\xDF")) in identify_magic() 68 if (startswith(Magic, "\x01\xF7")) in identify_magic() 73 if (startswith(Magic, "\x03\xF0\x00")) in identify_magic() 76 if (startswith(Magic, "\x03\x02\x23\x07")) in identify_magic() 81 if (startswith(Magic, "\x07\x23\x02\x03")) in identify_magic() 86 if (startswith(Magic, "\x10\xFF\x10\xAD")) in identify_magic() 91 if (startswith(Magic, "\xDE\xC0\x17\x0B")) in identify_magic() [all …]
|
H A D | ELF.cpp | 573 .StartsWith("hpux", ELFOSABI_HPUX) in convertNameToOSABI() 574 .StartsWith("netbsd", ELFOSABI_NETBSD) in convertNameToOSABI() 575 .StartsWith("gnu", ELFOSABI_GNU) in convertNameToOSABI() 576 .StartsWith("hurd", ELFOSABI_HURD) in convertNameToOSABI() 577 .StartsWith("solaris", ELFOSABI_SOLARIS) in convertNameToOSABI() 578 .StartsWith("aix", ELFOSABI_AIX) in convertNameToOSABI() 579 .StartsWith("irix", ELFOSABI_IRIX) in convertNameToOSABI() 580 .StartsWith("freebsd", ELFOSABI_FREEBSD) in convertNameToOSABI() 581 .StartsWith("tru64", ELFOSABI_TRU64) in convertNameToOSABI() 582 .StartsWith("modesto", ELFOSABI_MODESTO) in convertNameToOSABI() [all …]
|
/llvm-project/llvm/utils/ |
H A D | sort_includes.py | 39 if l.startswith("#include"): 45 if look_for_api_header and header.startswith('"'): 50 header.startswith("<") 51 or header.startswith('"gtest/') 52 or header.startswith('"isl/') 53 or header.startswith('"json/') 58 header.startswith('"clang/') 59 or header.startswith('"clang-c/') 60 or header.startswith('"polly/') 64 if header.startswith('"llvm/') or header.startswith('"llvm-c/'): [all …]
|
H A D | extract_symbols.py | 92 if symbol.startswith(("__xmm@", "__ymm@", "__real@")): 98 elif symbol.startswith("??_G") or symbol.startswith("??_E"): 137 if calling_convention_decoration and symbol.startswith("_"): 140 if not symbol.startswith("_") and not symbol.startswith("."): 195 assert arg.startswith("I"), arg 209 elif tmp.startswith("I"): 212 elif tmp.startswith("N"): 215 elif tmp.startswith(" [all...] |
/llvm-project/clang-tools-extra/clangd/unittests/tweaks/ |
H A D | ExpandDeducedTypeTests.cpp | 13 using ::testing::StartsWith; 50 StartsWith("fail: Could not deduce type for 'auto' type")); in TEST_F() 53 StartsWith("fail: Could not expand type")); in TEST_F() 56 StartsWith("fail: Could not expand type")); in TEST_F() 70 StartsWith("fail: Could not expand type")); in TEST_F() 82 StartsWith("fail: Could not expand type")); in TEST_F() 85 StartsWith("fail: Could not expand type")); in TEST_F() 88 StartsWith("fail: Could not expand type")); in TEST_F() 94 StartsWith("fail: Could not deduce type for 'auto' type")); in TEST_F() 100 StartsWith("fail: Could not expand type")); in TEST_F() [all …]
|
/llvm-project/llvm/lib/TargetParser/ |
H A D | Triple.cpp | 434 .StartsWith("bpf", BPFArch) in getArchTypeForLLVMName() 620 .StartsWith("kalimba", Triple::kalimba) in parseArch() 672 .StartsWith("darwin", Triple::Darwin) in parseOS() 673 .StartsWith("dragonfly", Triple::DragonFly) in parseOS() 674 .StartsWith("freebsd", Triple::FreeBSD) in parseOS() 675 .StartsWith("fuchsia", Triple::Fuchsia) in parseOS() 676 .StartsWith("ios", Triple::IOS) in parseOS() 677 .StartsWith("kfreebsd", Triple::KFreeBSD) in parseOS() 678 .StartsWith("linux", Triple::Linux) in parseOS() 679 .StartsWith("lv in parseOS() [all...] |
/llvm-project/compiler-rt/test/fuzzer/ |
H A D | lit.cfg.py | 30 sys.platform.startswith("darwin") 31 or sys.platform.startswith("freebsd") 32 or sys.platform.startswith("win") 40 sys.platform.startswith("darwin") 41 or sys.platform.startswith("win") 50 if sys.platform.startswith("win") or sys.platform.startswith("cygwin"): 53 if sys.platform.startswith("darwin"): 56 if sys.platform.startswith("linux"): 58 # between python 2 and 3, hence the use of ``.startswith()`` [all...] |
/llvm-project/lldb/test/API/functionalities/gdb_remote_client/ |
H A D | TestGDBRemotePlatformFile.py | 12 if packet.startswith("vFile:open:"): 14 elif packet.startswith("vFile:pread:"): 16 elif packet.startswith("vFile:pwrite:"): 18 elif packet.startswith("vFile:close:"): 102 if packet.startswith("vFile:open:"): 104 elif packet.startswith("vFile:fstat:"): 106 if packet.startswith("vFile:close:"): 178 if packet.startswith("vFile:open:"): 180 elif packet.startswith("vFile:fstat:"): 182 if packet.startswith("vFil [all...] |
/llvm-project/clang/docs/tools/ |
H A D | dump_format_style.py | 104 if not indent_first_line or s.startswith("\n"): 264 and not line.startswith("/// " + " " * self.code_indent) 322 if line.startswith("///"): 329 if line.startswith(r"/// \version"): 333 elif line.startswith("/// @deprecated"): 335 elif line.startswith("///"): 337 elif line.startswith("enum"): 341 elif line.startswith("struct"): 347 if line.startswith(prefix): 367 if line.startswith("///") [all...] |
/llvm-project/lldb/unittests/Utility/ |
H A D | NameMatchesTest.cpp | 33 TEST(NameMatchesTest, StartsWith) { in TEST() argument 34 EXPECT_TRUE(NameMatches("foo", NameMatch::StartsWith, "f")); in TEST() 35 EXPECT_TRUE(NameMatches("foo", NameMatch::StartsWith, "")); in TEST() 36 EXPECT_TRUE(NameMatches("", NameMatch::StartsWith, "")); in TEST() 37 EXPECT_FALSE(NameMatches("foo", NameMatch::StartsWith, "b")); in TEST() 38 EXPECT_FALSE(NameMatches("", NameMatch::StartsWith, "b")); in TEST()
|
/llvm-project/clang-tools-extra/docs/clang-tidy/checks/abseil/ |
H A D | string-find-startswith.rst | 1 .. title:: clang-tidy - abseil-string-find-startswith 3 abseil-string-find-startswith 8 suggests replacing with ``absl::StartsWith()``. This is both a readability and 27 if (absl::StartsWith(s, "Hello World")) { /* do something */ } 28 if (absl::StartsWith(s, "Hello World")) { /* do something */ }
|
/llvm-project/clang/utils/ |
H A D | CmpDriver | 82 return (filename.startswith('/tmp/', 1) or 83 filename.startswith('/var/', 1)) 101 ln.startswith('Target: ') or 102 ln.startswith('Configured with: ') or 103 ln.startswith('Thread model: ') or 104 ln.startswith('gcc version') or 105 ln.startswith('clang version')): 107 elif ln.strip().startswith('"'):
|
/llvm-project/lldb/packages/Python/lldbsuite/test/ |
H A D | gdbclientutils.py | 108 if packet.startswith("vCont;c"): 152 assert tid.startswith("p") 163 if packet.startswith("vAttach;"): 168 if packet.startswith("qThreadStopInfo"): 175 if packet.startswith("qMemoryRegionInfo:"): 189 if packet.startswith("qfProcessInfo"): 191 if packet.startswith("jGetLoadedDynamicLibrariesInfos"): 193 if packet.startswith("qPathComplete:"): 195 if packet.startswith("vFile:"): 197 if packet.startswith("vRun;"): [all …]
|
/llvm-project/polly/test/ |
H A D | update_check.py | 84 if line.startswith( 88 elif line.startswith("remark: "): 135 elif line.startswith(" Alias Groups ("): 139 if not line.startswith(" "): 151 while line.startswith(" "): 158 while line.startswith(" "): 165 while line.startswith(" "): 172 while line.startswith(" "): 179 while line.startswith(" "): 183 elif line.startswith("Ne [all...] |
/llvm-project/clang/unittests/AST/ |
H A D | ASTDumperTest.cpp | 29 using testing::StartsWith; 85 StartsWith("|-Concept"), // in TEST() 87 StartsWith(" `-BuiltinType"))); in TEST() 107 StartsWith("|-ParmVarDecl"), in TEST() 109 StartsWith("|-ParmVarDecl"), in TEST() 125 StartsWith("|-ParmVarDecl"), in TEST() 128 StartsWith("| `-TemplateTypeParm"), in TEST()
|
/llvm-project/bolt/docs/ |
H A D | generate_doc.py | 64 if cleaned_line.startswith("-"): 77 if option.startswith("--print") or option.startswith("--time"): 83 if cleaned_line.startswith("="): 118 if line.startswith("="): 124 if line[2:].startswith("<"):
|
/llvm-project/llvm/lib/MC/MCParser/ |
H A D | AsmLexer.cpp | 890 .StartsWith("call16", {AsmToken::PercentCall16, 7}) in LexToken() 891 .StartsWith("call_hi", {AsmToken::PercentCall_Hi, 8}) in LexToken() 892 .StartsWith("call_lo", {AsmToken::PercentCall_Lo, 8}) in LexToken() 893 .StartsWith("dtprel_hi", {AsmToken::PercentDtprel_Hi, 10}) in LexToken() 894 .StartsWith("dtprel_lo", {AsmToken::PercentDtprel_Lo, 10}) in LexToken() 895 .StartsWith("got_disp", {AsmToken::PercentGot_Disp, 9}) in LexToken() 896 .StartsWith("got_hi", {AsmToken::PercentGot_Hi, 7}) in LexToken() 897 .StartsWith("got_lo", {AsmToken::PercentGot_Lo, 7}) in LexToken() 898 .StartsWith("got_ofst", {AsmToken::PercentGot_Ofst, 9}) in LexToken() 899 .StartsWith("got_pag in LexToken() [all...] |
H A D | WasmAsmParser.cpp | 161 .StartsWith(".data", SectionKind::getData()) in parseSectionDirective() 162 .StartsWith(".tdata", SectionKind::getThreadData()) in parseSectionDirective() 163 .StartsWith(".tbss", SectionKind::getThreadBSS()) in parseSectionDirective() 164 .StartsWith(".rodata", SectionKind::getReadOnly()) in parseSectionDirective() 165 .StartsWith(".text", SectionKind::getText()) in parseSectionDirective() 166 .StartsWith(".custom_section", SectionKind::getMetadata()) in parseSectionDirective() 167 .StartsWith(".bss", SectionKind::getBSS()) in parseSectionDirective() 170 .StartsWith(".init_array", SectionKind::getData()) in parseSectionDirective() 171 .StartsWith(".debug_", SectionKind::getMetadata()) in parseSectionDirective()
|
/llvm-project/offload/test/ |
H A D | lit.cfg | 123 if config.libomptarget_current_target.startswith('nvptx'): 131 elif config.libomptarget_current_target.startswith('amdgcn'): 134 if not (config.amdgpu_test_arch.startswith("gfx90a") or 135 config.amdgpu_test_arch.startswith("gfx940") or 136 config.amdgpu_test_arch.startswith("gfx942")): 139 if (config.amdgpu_test_arch.startswith("gfx940") or 140 (config.amdgpu_test_arch.startswith("gfx942") and 166 if config.libomptarget_current_target.startswith('nvptx'): 201 if config.libomptarget_current_target.startswith('nvptx'): 204 if config.libomptarget_current_target.startswith('amdgc [all...] |
/llvm-project/clang/utils/perf-training/ |
H A D | perf-helper.py | 165 first_cmd = next(arg for arg in args if not arg.startswith("--")) 234 or ln.startswith("Configured with:") 235 or ln.startswith("Target:") 236 or ln.startswith("Thread model:") 237 or ln.startswith("InstalledDir:") 238 or ln.startswith("LLVM Profile Note") 239 or ln.startswith(" (in-process)") 265 first_cmd = next(arg for arg in args if not arg.startswith("--")) 291 if not s.startswith(symbol): 305 if not ln.startswith("dtrac [all...] |
/llvm-project/compiler-rt/lib/fuzzer/scripts/ |
H A D | unbalanced_allocs.py | 34 while line and line.startswith(" #"): 41 if not line.startswith("FREE["): 54 if not line.startswith("MALLOC["): 66 if not line.startswith("MallocFreeTracer: START"): 73 if line.startswith("MallocFreeTracer: STOP"):
|
/llvm-project/lldb/test/API/tools/lldb-dap/variables/ |
H A D | TestDAP_variables.py | 34 if "startswith" in verify_dict: 35 verify = verify_dict["startswith"] 39 startswith = actual_value.startswith(verify_value) 41 startswith, 101 if not name.startswith("std::"): 183 "startswith": {"value": "0x"}, 264 "startswith": { 275 "startswith": { 286 "startswith" [all...] |
/llvm-project/third-party/benchmark/tools/gbench/ |
H A D | util.py | 15 _num_magic_bytes = 2 if sys.platform.startswith("win") else 4 37 elif sys.platform.startswith("win"): 100 assert prefix.startswith("--") and prefix.endswith("=") 103 if f.startswith(prefix): 113 assert prefix.startswith("--") and prefix.endswith("=") 114 return [f for f in benchmark_flags if not f.startswith(prefix)]
|
/llvm-project/clang-tools-extra/clangd/unittests/support/ |
H A D | TraceTests.cpp | 26 using testing::StartsWith; 172 StartsWith("d,dist,x,1.000000e+00,"), in TEST_F() 173 StartsWith("c,cnt,,1.000000e+00,"), in TEST_F() 174 StartsWith("d,dist,y,2.000000e+00,"), "")); in TEST_F() 182 EXPECT_THAT(outputLines(), ElementsAre(_, StartsWith(R"(d,dist,",",1)"), in TEST_F() 183 StartsWith(R"(d,dist,"a""b",1)"), in TEST_F() 184 StartsWith("d,dist,\"a\nb\",1"), "")); in TEST_F()
|