reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

Declarations

include/llvm/ADT/StringRef.h
   56     static const size_t npos = ~size_t(0);

References

include/llvm/ADT/SmallString.h
  162   size_t rfind(char C, size_t From = StringRef::npos) const {
  204   size_t find_last_of(char C, size_t From = StringRef::npos) const {
  213       StringRef Chars, size_t From = StringRef::npos) const {
  245   StringRef substr(size_t Start, size_t N = StringRef::npos) const {
include/llvm/ADT/StringRef.h
  312       return npos;
  334       return npos;
  365     size_t rfind(char C, size_t From = npos) const {
  373       return npos;
  381     size_t rfind_lower(char C, size_t From = npos) const;
  426     size_t find_last_of(char C, size_t From = npos) const {
  435     size_t find_last_of(StringRef Chars, size_t From = npos) const;
  440     size_t find_last_not_of(char C, size_t From = npos) const;
  447     size_t find_last_not_of(StringRef Chars, size_t From = npos) const;
  452     bool contains(StringRef Other) const { return find(Other) != npos; }
  457     bool contains(char C) const { return find_first_of(C) != npos; }
  463       return find_lower(Other) != npos;
  469     bool contains_lower(char C) const { return find_lower(C) != npos; }
  598     StringRef substr(size_t Start, size_t N = npos) const {
  733       if (Idx == npos)
  735       return std::make_pair(slice(0, Idx), slice(Idx + Separator.size(), npos));
  751       if (Idx == npos)
  753       return std::make_pair(slice(0, Idx), slice(Idx + Separator.size(), npos));
include/llvm/Analysis/ObjCARCAnalysisUtils.h
  236       if (Section.find("__message_refs") != StringRef::npos ||
  237           Section.find("__objc_classrefs") != StringRef::npos ||
  238           Section.find("__objc_superrefs") != StringRef::npos ||
  239           Section.find("__objc_methname") != StringRef::npos ||
  240           Section.find("__cstring") != StringRef::npos)
include/llvm/ProfileData/InstrProf.h
  584   if (S == StringRef::npos)
include/llvm/ProfileData/SampleProf.h
  510         if (It == StringRef::npos)
include/llvm/Support/FormatProviders.h
  203     size_t N = StringRef::npos;
  376       if (End == StringRef::npos) {
include/llvm/Support/YAMLTraits.h
  565            S.drop_front(2).find_first_not_of("01234567") == StringRef::npos;
  569                                "0123456789abcdefABCDEF") == StringRef::npos;
lib/Analysis/TargetLibraryInfo.cpp
  610   if (funcName.empty() || funcName.find('\0') != StringRef::npos)
lib/AsmParser/LLLexer.cpp
  283         if (StringRef(StrVal).find_first_of(0) != StringRef::npos) {
  366         if (StringRef(StrVal).find_first_of(0) != StringRef::npos) {
  401     if (StringRef(StrVal).find_first_of(0) != StringRef::npos) {
lib/Bitcode/Reader/BitcodeReader.cpp
 2020   if (NameStr.find_first_of(0) != StringRef::npos)
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  431   return Name.find(") ") != StringRef::npos;
lib/CodeGen/MIRParser/MIRParser.cpp
  904       if (Indent != StringRef::npos)
lib/CodeGen/TargetLoweringBase.cpp
 1856   if (Position == StringRef::npos)
lib/DebugInfo/Symbolize/Symbolize.cpp
  493     if (AtPos != StringRef::npos &&
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
  446     size_t FirstNonDigit = StringRef::npos;
  449       if (FirstNonDigit == StringRef::npos)
  453       if (FirstNonDigit == StringRef::npos)
lib/IR/AutoUpgrade.cpp
  550       if (Name.find("lane") == StringRef::npos)
 2096       bool IsUnsigned = (StringRef::npos != Name.find("cvtu"));
 2264       bool DoSext = (StringRef::npos != Name.find("pmovsx"));
lib/IR/Constants.cpp
 2795   return Str.drop_back().find(0) == StringRef::npos;
lib/IR/IntrinsicInst.cpp
   77     CmpEnd = CmpEnd == StringRef::npos ? Name.size() : CmpEnd;
lib/IR/PassTimingInfo.cpp
  232   if (prefix_pos == StringRef::npos)
lib/IR/Value.cpp
  234   assert(NameRef.find_first_of(0) == StringRef::npos &&
lib/IR/Verifier.cpp
 1040     AssertDI(Checksum->Value.find_if_not(llvm::isHexDigit) == StringRef::npos,
lib/Linker/IRMover.cpp
  733   return (DotPos == 0 || DotPos == StringRef::npos || Name.back() == '.' ||
lib/MC/ELFObjectWriter.cpp
 1284     assert(Pos != StringRef::npos);
lib/MC/MCParser/ELFAsmParser.cpp
  778   if (AliasName.find('@') == StringRef::npos)
lib/MC/MCSectionELF.cpp
   33                              "ABCDEFGHIJKLMNOPQRSTUVWXYZ") == Name.npos) {
lib/MC/MCSectionWasm.cpp
   27                              "ABCDEFGHIJKLMNOPQRSTUVWXYZ") == Name.npos) {
lib/Object/Archive.cpp
  118   if (end == StringRef::npos)
  182       if (End == StringRef::npos || End < 1 ||
lib/Object/COFFImportFile.cpp
  114   if (Pos == StringRef::npos && From.startswith("_") && To.startswith("_")) {
  120   if (Pos == StringRef::npos) {
lib/Object/COFFModuleDefinition.cpp
  102       Buf = (End == Buf.npos) ? "" : Buf.drop_front(End);
  136       Buf = (End == Buf.npos) ? "" : Buf.drop_front(End);
lib/Object/MachOObjectFile.cpp
 2316   if (a == Name.npos || a == 0)
 2318   Foo = Name.slice(a+1, Name.npos);
 2322   if (Idx != Foo.npos && Foo.size() >= 2) {
 2323     Suffix = Foo.slice(Idx, Foo.npos);
 2332   if (b == Name.npos)
 2345   if (b == Name.npos)
 2348   if (c == Name.npos || c == 0)
 2350   V = Name.slice(c+1, Name.npos);
 2354   if (d == Name.npos)
 2369   if (a == Name.npos || a == 0)
 2371   Dylib = Name.slice(a, Name.npos);
 2383   if (b == Name.npos)
 2389   if (Idx != Name.npos && Idx != b) {
 2409   Qtx = Name.slice(a, Name.npos);
 2413   if (b == Name.npos)
lib/ObjectYAML/ELFEmitter.cpp
  368   if (SuffixPos == StringRef::npos)
lib/Passes/PassBuilder.cpp
 1762     if (Pos == Text.npos)
lib/ProfileData/InstrProfWriter.cpp
  218       Name.find(FuncFilter.NameFilter) != Name.npos)
lib/ProfileData/SampleProfReader.cpp
  109   if (n2 == StringRef::npos) {
  124     if (n3 == StringRef::npos) {
  143     while (n3 != StringRef::npos) {
  147       if (n3 == StringRef::npos || n3 == 0)
  159         n4 = (n4 != StringRef::npos) ? n3 + n4 + 1 : Rest.size();
  166         if (n5 == StringRef::npos)
lib/Support/ARMTargetParser.cpp
  274   size_t offset = StringRef::npos;
  292     if (A.find("eb") != StringRef::npos)
  299   if (offset != StringRef::npos && A.substr(offset, 2) == "eb")
  305   if (offset != StringRef::npos)
  313   if (offset != StringRef::npos) {
  318     if (A.find("eb") != StringRef::npos)
lib/Support/BinaryStreamReader.cpp
   84     if (LLVM_LIKELY(Pos != StringRef::npos)) {
lib/Support/CommandLine.cpp
  518   if (EqualPos == StringRef::npos) {
  616     while (Pos != StringRef::npos) {
lib/Support/DataExtractor.cpp
  157   if (pos != StringRef::npos) {
  167   if (Pos != StringRef::npos) {
lib/Support/FileCheck.cpp
  277   if (DefEnd != StringRef::npos) {
  306   if (DefEnd != StringRef::npos) {
  355       (PatternStr.size() < 2 || (PatternStr.find("{{") == StringRef::npos &&
  356                                  PatternStr.find("[[") == StringRef::npos))) {
  378       if (End == StringRef::npos) {
  417       if (End == StringRef::npos) {
  442         if (SpacePos != StringRef::npos) {
  459         IsDefinition = (VarEndIdx != StringRef::npos);
  625     if (Pos == StringRef::npos)
  789   size_t Best = StringRef::npos;
  807     if (Quality < BestQuality || Best == StringRef::npos) {
  816   if (Best && Best != StringRef::npos && BestQuality < 50) {
  896   return StringRef::npos;
 1439     if (LastPos == StringRef::npos)
 1440       return StringRef::npos;
 1459       return StringRef::npos;
 1486       return StringRef::npos;
 1495       return StringRef::npos;
 1501       return StringRef::npos;
 1643         return StringRef::npos;
 1710           return StringRef::npos;
 1786     if (EqIdx == StringRef::npos) {
 1951       if (MatchLabelPos == StringRef::npos)
 1975       if (MatchPos == StringRef::npos) {
lib/Support/FormatVariadic.cpp
   94   while (From < Fmt.size() && From != StringRef::npos) {
  114     if (BC == StringRef::npos) {
lib/Support/GlobPattern.cpp
   22   return S.find_first_of("?*[\\") != StringRef::npos;
   81     if (End == StringRef::npos)
lib/Support/Host.cpp
  295       if (Pos != StringRef::npos) {
  314       if (Pos != StringRef::npos) {
lib/Support/Path.cpp
  102       if (pos == StringRef::npos)
  106     if (pos == StringRef::npos || (pos == 1 && is_separator(str[0], style)))
  131     return StringRef::npos;
  146            (root_dir_pos == StringRef::npos || end_pos > root_dir_pos) &&
  324       (root_dir_pos == StringRef::npos || end_pos - 1 > root_dir_pos)) {
  468   if (end_pos == StringRef::npos)
  476   if (end_pos != StringRef::npos)
  488   if (pos != StringRef::npos && pos >= filename_pos(p, style))
  570   if (pos == StringRef::npos)
  583   if (pos == StringRef::npos)
  797   assert(P.find_first_of(separators(Style::native)) == StringRef::npos &&
lib/Support/Regex.cpp
  212   return Str.find_first_of(RegexMetachars) == StringRef::npos;
lib/Support/SourceMgr.cpp
  146   if (NewlineOffs == StringRef::npos) NewlineOffs = ~(size_t)0;
  283     if (I->getText().find_first_of("\n\r\t") != StringRef::npos)
  345     if (NextTab == StringRef::npos) {
lib/Support/StringExtras.cpp
   24     return StringRef::npos;
   28   return StringRef::npos;
lib/Support/StringRef.cpp
  134     return npos;
  144     return npos;
  147     return Ptr == nullptr ? npos : Ptr - Data;
  159     return npos;
  178   return npos;
  189   return npos;
  200   return npos;
  210     return npos;
  216   return npos;
  222     return npos;
  228   return npos;
  244   return npos;
  253   return npos;
  269   return npos;
  285   return npos;
  294   return npos;
  310   return npos;
  324     if (Idx == npos)
  332     S = S.slice(Idx + Separator.size(), npos);
  350     if (Idx == npos)
  358     S = S.slice(Idx + 1, npos);
lib/Support/TarWriter.cpp
  135   if (Sep == StringRef::npos)
lib/Support/Unix/Program.inc
   73   if (Name.find('/') != StringRef::npos)
lib/Support/VirtualFileSystem.cpp
 1923   return Path.slice(Parent.size() + 1, StringRef::npos);
lib/Support/YAMLParser.cpp
  926           != StringRef::npos) {
 1348               != StringRef::npos)))
 1748         || FirstChar.find_first_of("-?:,[]{}#&*!|>'\"%@`") != StringRef::npos)
 1884     if (i != StringRef::npos)
 1891     if (i != StringRef::npos) {
 1895       for (; i != StringRef::npos; i = UnquotedValue.find('\'')) {
 1917   for (; i != StringRef::npos; i = UnquotedValue.find_first_of("\\\r\n")) {
lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
 2884   if (Name.find('.') != StringRef::npos)
 2957   bool ExpectRegister = (Op.lower().find("all") == StringRef::npos);
 3143     if (Next != StringRef::npos) {
 3144       Kind = Name.slice(Next, StringRef::npos);
 3790   if (Head == "b" && Next != StringRef::npos) {
 3807   while (Next != StringRef::npos) {
lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp
  104   if (TypeQual.find("pipe") != StringRef::npos)
  546   if (TypeQual.find("pipe") != StringRef::npos)
lib/Target/AMDGPU/AMDGPULibCalls.cpp
 1389        Features.find_lower("wavefrontsize") == StringRef::npos))
lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
  115               ConvSpecifiers, CurFmtSpecifierIdx)) != StringRef::npos) {
  120     if (pTag != StringRef::npos) {
lib/Target/AMDGPU/AMDGPUSubtarget.cpp
  103   if (FS.find_lower("+wavefrontsize") != StringRef::npos) {
  104     if (FS.find_lower("wavefrontsize16") == StringRef::npos)
  106     if (FS.find_lower("wavefrontsize32") == StringRef::npos)
  108     if (FS.find_lower("wavefrontsize64") == StringRef::npos)
lib/Target/ARM/AsmParser/ARMAsmParser.cpp
 4964   if (Next != StringRef::npos)
 6899   while (Next != StringRef::npos) {
lib/Target/Hexagon/HexagonTargetObjectFile.cpp
   92   return Sec.find(".sdata.") != StringRef::npos ||
   93          Sec.find(".sbss.") != StringRef::npos ||
   94          Sec.find(".scommon.") != StringRef::npos;
  181     if (Section.find(".access.text.group") != StringRef::npos)
  184     if (Section.find(".access.data.group") != StringRef::npos)
lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
 1581   if (Dot != StringRef::npos) {
 1583     StringRef DotStr = Name.slice(Dot, StringRef::npos);
lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
  391     auto IsLoadStore = InstName.find(".load") != StringRef::npos ||
  392                        InstName.find(".store") != StringRef::npos;
  393     auto IsAtomic = InstName.find("atomic.") != StringRef::npos;
lib/Target/X86/X86FrameLowering.cpp
 2639         if (F->getName().find("erlang.") != StringRef::npos ||
 2640             F->getName().find("bif_") != StringRef::npos ||
 2641             F->getName().find_first_of("._") == StringRef::npos)
lib/Transforms/IPO/SampleProfile.cpp
 1735     if (pos != StringRef::npos) {
lib/Transforms/Instrumentation/AddressSanitizer.cpp
 1852     if (Section.find("__llvm") != StringRef::npos || Section.find("__LLVM") != StringRef::npos) return false;
 1852     if (Section.find("__llvm") != StringRef::npos || Section.find("__LLVM") != StringRef::npos) return false;
lib/Transforms/Scalar/SROA.cpp
 2402     if (LastSROAPrefix != StringRef::npos) {
 2406       if (IndexEnd != StringRef::npos && OldName[IndexEnd] == '.') {
 2410         if (OffsetEnd != StringRef::npos && OldName[OffsetEnd] == '.')
lib/Transforms/Utils/SimplifyLibCalls.cpp
  377   if (I == StringRef::npos) // Didn't find the char.  strchr returns null.
  405   if (I == StringRef::npos) // Didn't find the char. Return null.
  766     if (I == StringRef::npos) // No match.
  804     if (Pos == StringRef::npos)
  824     if (Pos == StringRef::npos)
  873     if (Offset == StringRef::npos) // strstr("foo", "bar") -> null
  980   if (I == StringRef::npos) // Didn't find the char.  memchr returns null.
 2357       FormatStr.find('%') == StringRef::npos) { // No format characters.
 2425     if (FormatStr.find('%') != StringRef::npos)
 2526     if (FormatStr.find('%') != StringRef::npos)
 2615     if (FormatStr.find('%') != StringRef::npos)
lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
  220   Name = Name.substr(Prefix().size(), StringRef::npos);
tools/clang/lib/ARCMigrate/ObjCMT.cpp
  499       (PropertyName.find("delegate") != StringRef::npos) ||
  500       (PropertyName.find("dataSource") != StringRef::npos)) {
 1352   if (Ix == StringRef::npos)
tools/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
  150               fname.find("Create") != StringRef::npos ||
  151               fname.find("Copy") != StringRef::npos) {
  171           if (fname.find("Get") != StringRef::npos) {
tools/clang/lib/ARCMigrate/Transforms.cpp
   98             fname.find("Create") != StringRef::npos ||
   99             fname.find("Copy") != StringRef::npos) {
tools/clang/lib/AST/ASTContext.cpp
  265   if (Text.find_first_of(";{}#@") != StringRef::npos)
tools/clang/lib/AST/CommentLexer.cpp
  316           if (End != StringRef::npos)
  503   if (Pos == StringRef::npos) {
tools/clang/lib/AST/DeclBase.cpp
  476   if (suffix != StringRef::npos)
tools/clang/lib/AST/Expr.cpp
 4059     if (Comp.substr(i + 1).find(Comp[i]) != StringRef::npos)
tools/clang/lib/AST/ExprConstant.cpp
10727         if (Pos != StringRef::npos)
tools/clang/lib/AST/PrintfFormatString.cpp
  160         if (CommaOrBracePos == StringRef::npos) {
tools/clang/lib/AST/RawCommentList.cpp
  402     if (WhitespaceLen == StringRef::npos)
tools/clang/lib/AST/StmtPrinter.cpp
 1166   if (Str.find_first_not_of("-0123456789") == StringRef::npos)
tools/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
  348           [](StringRef Name) { return Name.find("::") == Name.npos; })),
tools/clang/lib/Analysis/RetainSummaryManager.cpp
  392              (FName.find("Insert") != StringRef::npos)) {
  475           (StrInStrNoCase(FName, "InsertValue") != StringRef::npos ||
  476            StrInStrNoCase(FName, "AddValue") != StringRef::npos ||
  477            StrInStrNoCase(FName, "SetValue") != StringRef::npos ||
  478            StrInStrNoCase(FName, "AppendValue") != StringRef::npos ||
  479            StrInStrNoCase(FName, "SetAttribute") != StringRef::npos)
tools/clang/lib/Basic/Module.cpp
   84     if (Pos == StringRef::npos)
tools/clang/lib/Basic/ObjCRuntime.cpp
   55   if (dash != StringRef::npos && dash + 1 != input.size() &&
   57     dash = StringRef::npos;
   87   if (dash != StringRef::npos) {
tools/clang/lib/Basic/Version.cpp
   49   if (Start != StringRef::npos)
   67   if (Start != StringRef::npos)
tools/clang/lib/CodeGen/CodeGenModule.cpp
 2594           Name == BuiltinName.slice(strlen("__builtin_"), StringRef::npos)) {
tools/clang/lib/CodeGen/TargetInfo.cpp
 2373   bool Quote = (Lib.find(" ") != StringRef::npos);
tools/clang/lib/Driver/Distro.cpp
   68       if (Data.find("release 7") != StringRef::npos)
   70       else if (Data.find("release 6") != StringRef::npos)
   72       else if (Data.find("release 5") != StringRef::npos)
tools/clang/lib/Driver/Driver.cpp
  434   if (TargetTriple.find("-unknown-gnu") != StringRef::npos ||
  435       TargetTriple.find("-pc-gnu") != StringRef::npos)
  859   if (ArchPrefixLen == StringRef::npos)
 1195     if (ParentProcPos == StringRef::npos)
 1198     if (LineEnd == StringRef::npos)
 2219       if (Val.find_first_of("/\\") != StringRef::npos) {
tools/clang/lib/Driver/Job.cpp
  102   const bool Escape = Arg.find_first_of(" \"\\$") != StringRef::npos;
  197     StringRef Inc = FlagRef.slice(2, StringRef::npos);
tools/clang/lib/Driver/ToolChains/Arch/ARM.cpp
  494         if (ArchName.find_lower("+nosha2") == StringRef::npos &&
  495             CPUName.find_lower("+nosha2") == StringRef::npos)
  497         if (ArchName.find_lower("+noaes") == StringRef::npos &&
  498             CPUName.find_lower("+noaes") == StringRef::npos)
tools/clang/lib/Driver/ToolChains/Arch/RISCV.cpp
  156     if (Pos != StringRef::npos) {
  259   if (Pos != StringRef::npos) {
tools/clang/lib/Driver/ToolChains/Clang.cpp
  161   if (Position != StringRef::npos) {
  538     if (Map.find('=') == StringRef::npos)
tools/clang/lib/Driver/ToolChains/CommonArgs.cpp
  106   while ((Delim = Dirs.find(llvm::sys::EnvPathSeparator)) != StringRef::npos) {
tools/clang/lib/Driver/ToolChains/Darwin.cpp
  930   if (Index == StringRef::npos)
 1540     if (StartVer != StringRef::npos && EndVer > StartVer)
tools/clang/lib/Driver/ToolChains/Linux.cpp
  265       StringRef::npos)
  878         !VersionText.slice(1, StringRef::npos).getAsInteger(10, Version)) {
tools/clang/lib/Driver/ToolChains/MSVC.cpp
 1473   if (Hash == StringRef::npos || Hash > Val.find('=')) {
tools/clang/lib/Format/BreakableToken.cpp
   74     return BreakableToken::Split(StringRef::npos, 0);
   92   while (SpaceOffset != StringRef::npos) {
  107   if (SpaceOffset == StringRef::npos ||
  109       Text.find_last_not_of(Blanks, SpaceOffset) == StringRef::npos) {
  113     if (FirstNonWhitespace == StringRef::npos)
  115       return BreakableToken::Split(StringRef::npos, 0);
  119   if (SpaceOffset != StringRef::npos && SpaceOffset != 0) {
  125       return BreakableToken::Split(StringRef::npos, 0);
  134   return BreakableToken::Split(StringRef::npos, 0);
  142     return BreakableToken::Split(StringRef::npos, 0);
  144     return BreakableToken::Split(StringRef::npos, 0);
  183   return BreakableToken::Split(StringRef::npos, 0);
  225          encoding::columnWidthWithTabs(Line.substr(Offset, StringRef::npos),
  277     return Split(StringRef::npos, 0);
  464     return Split(StringRef::npos, 0);
  484   if (EndOfPreviousLine == StringRef::npos)
  490   if (StartOfLine == StringRef::npos)
  522     if (Content[LineIndex].substr(Offset, StringRef::npos).empty()) {
  533          getRangeLength(LineIndex, Offset, StringRef::npos, StartColumn);
  604     return Split(StringRef::npos, 0);
  611     if (PreviousContentIndent && Trimmed != StringRef::npos &&
  613       return Split(StringRef::npos, 0);
  616   return Split(0, Trimmed != StringRef::npos ? Trimmed : 0);
  622          Lines[0].substr(1).find_first_not_of(Blanks) != StringRef::npos;
  655       if (BreakLength != StringRef::npos)
  706   return Split(StringRef::npos, 0);
  783       if (EndOfLine == StringRef::npos)
  850     return Split(StringRef::npos, 0);
  858   return Split(0, Trimmed != StringRef::npos ? Trimmed : 0);
tools/clang/lib/Format/BreakableToken.h
  125     return getRangeLength(LineIndex, Offset, StringRef::npos, StartColumn);
  194     return Split(StringRef::npos, 0);
  216     return Split(StringRef::npos, 0);
tools/clang/lib/Format/ContinuationIndenter.cpp
  158   if (LParenPos == StringRef::npos)
 1492   if (LastNewlinePos == StringRef::npos) {
 1911       if (Split.first == StringRef::npos) {
 1954         if (NextSplit.first == StringRef::npos) {
 2082         if (SplitBeforeNext.first != StringRef::npos) {
 2105             if (Split.first == StringRef::npos) {
 2169   if (SplitAfterLastLine.first != StringRef::npos) {
tools/clang/lib/Format/Encoding.h
   67     if (TabPos == StringRef::npos)
tools/clang/lib/Format/Format.cpp
 2005         Code.substr(Prev, (Pos != StringRef::npos ? Pos : Code.size()) - Prev);
 2040     if (Pos == StringRef::npos || Pos + 1 == Code.size())
 2164         Code.substr(Prev, (Pos != StringRef::npos ? Pos : Code.size()) - Prev);
 2192     if (Pos == StringRef::npos || Pos + 1 == Code.size())
tools/clang/lib/Format/FormatTokenLexer.cpp
  465   StringRef FirstLineText = FirstBreak == StringRef::npos
  471   if (LastBreak != StringRef::npos) {
  494   if (To == StringRef::npos)
  564   if (LineOffset == StringRef::npos) {
  572   if (FirstSpace == StringRef::npos) {
  710     while (BackslashPos != StringRef::npos) {
  790   if (FirstNewlinePos == StringRef::npos) {
tools/clang/lib/Format/WhitespaceManager.cpp
  145     if (NewlinePos == StringRef::npos) {
tools/clang/lib/Frontend/CompilerInvocation.cpp
  358       if (val.find('=') != StringRef::npos) {
 1449     if (Val.find('=') == StringRef::npos)
 1864     if (Val.find('=') == StringRef::npos)
 2064     if (Val.find('=') != StringRef::npos)
 3296     if (Comma == StringRef::npos ||
tools/clang/lib/Frontend/DependencyFile.cpp
  286     if (NativePath.find_first_of(" #${}^!") != StringRef::npos)
tools/clang/lib/Frontend/InitPreprocessor.cpp
   47     if (End != StringRef::npos)
tools/clang/lib/Frontend/LayoutOverrideSource.cpp
   46     if (LineStr.find("*** Dumping AST Record Layout") != StringRef::npos)  {
   61       if ((Pos = LineStr.find("struct ")) != StringRef::npos)
   63       else if ((Pos = LineStr.find("class ")) != StringRef::npos)
   65       else if ((Pos = LineStr.find("union ")) != StringRef::npos)
   78     if (Pos != StringRef::npos) {
   90     if (Pos != StringRef::npos) {
  102     if (Pos != StringRef::npos) {
  112       if (Pos != StringRef::npos) {
  127     if (Pos == StringRef::npos)
tools/clang/lib/Frontend/TextDiagnostic.cpp
   50     if (Pos == StringRef::npos)
 1087           StringRef(I->CodeToInsert).find_first_of("\n\r") == StringRef::npos) {
tools/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp
  102     return S.find(Text) != StringRef::npos;
  619     while ((FPos = Content.find(NewlineStr, CPos)) != StringRef::npos) {
  628     if (D.RegexKind && D.Text.find("{{") == StringRef::npos) {
  764   if (loc == StringRef::npos) {
  773     if (loc == StringRef::npos || loc == C.size()) {
 1130       assert(RegexMatchLength != StringRef::npos);
 1138       if (VerbatimMatchLength == StringRef::npos)
tools/clang/lib/Index/CommentToXML.cpp
 1106     if (Pos == StringRef::npos)
tools/clang/lib/Lex/HeaderSearch.cpp
  496   if (SlashPos == StringRef::npos)
  948       if (SlashPos != StringRef::npos) {
  978       Filename.find('/') == StringRef::npos) {
 1032   if (SlashPos == StringRef::npos)
 1041   if (FrameworkPos == StringRef::npos ||
tools/clang/lib/Lex/Lexer.cpp
 1087   return NumWhitespaceChars == StringRef::npos
 2095       (Slash == StringRef::npos) ? "" : PartialPath.take_front(Slash);
 2097       (Slash == StringRef::npos) ? PathStart : PathStart + Slash + 1;
 2825   while (Pos != StringRef::npos) {
tools/clang/lib/Lex/LiteralSupport.cpp
 1047   if (Str.find('\'') != StringRef::npos) {
tools/clang/lib/Lex/PPDirectives.cpp
  117     if (Text.find("__") != StringRef::npos)
 1827     assert(SlashPos != StringRef::npos &&
tools/clang/lib/Rewrite/Rewriter.cpp
  262   if (indentNewLines && Str.find('\n') != StringRef::npos) {
tools/clang/lib/Sema/SemaChecking.cpp
 8800       StrRef.substr(0, TypeSize).find('\0') == StringRef::npos) {
tools/clang/lib/Sema/SemaDeclAttr.cpp
 2972     if (AttrStr.find(Str) != StringRef::npos)
 6296     if (AL.getAttrName()->getName().find("read_write") != StringRef::npos) {
 7526         if (suffix != StringRef::npos)
tools/clang/lib/Sema/SemaExpr.cpp
11239       LHSStrRef.find('\'') != StringRef::npos ||
11240       RHSStrRef.find('\'') != StringRef::npos)
tools/clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
 1995       if (s1Term != StringRef::npos)
 1999       if (s2Term != StringRef::npos)
tools/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
  770         FormatString->getString().find("%s") == StringRef::npos &&
  771         FormatString->getString().find("%[") == StringRef::npos)
tools/clang/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp
   47          M->getSelector().getNameForSlot(0).find("init") != StringRef::npos ||
   48          M->getSelector().getNameForSlot(0).find("Init") != StringRef::npos;
tools/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
  687     if ((D->getName().find("stdin") != StringRef::npos) && D->isExternC()) {
  713   if (C.getCalleeName(CE).find("setproctitle") != StringRef::npos) {
tools/clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
  719   return StringRef(name).lower().find("debug") != StringRef::npos;
 1254       if (VD->getName().lower().find("plural") != StringRef::npos ||
 1255           VD->getName().lower().find("singular") != StringRef::npos) {
tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
 3046           if (D->getCanonicalDecl()->getName().find("std") != StringRef::npos)
tools/clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
  131     if (Pos == StringRef::npos)
tools/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
 1583   if (Snippet.find_first_of("\r\n") != StringRef::npos)
tools/clang/lib/StaticAnalyzer/Core/CallEvent.cpp
  644   if (FName.startswith("NS") && (FName.find("Insert") != StringRef::npos))
  650     return StrInStrNoCase(FName, "InsertValue")  != StringRef::npos ||
  651            StrInStrNoCase(FName, "AddValue")     != StringRef::npos ||
  652            StrInStrNoCase(FName, "SetValue")     != StringRef::npos ||
  653            StrInStrNoCase(FName, "WithData")     != StringRef::npos ||
  654            StrInStrNoCase(FName, "AppendValue")  != StringRef::npos ||
  655            StrInStrNoCase(FName, "SetAttribute") != StringRef::npos;
tools/clang/lib/StaticAnalyzer/Core/CheckerContext.cpp
   54     if (BName.find(Name) != StringRef::npos)
   82   if (FName.startswith("__inline") && (FName.find(Name) != StringRef::npos))
   86       FName.find(Name) != StringRef::npos)
tools/clang/lib/StaticAnalyzer/Core/IssueHash.cpp
  141   if (col == StringRef::npos)
tools/clang/lib/StaticAnalyzer/Core/MemRegion.cpp
  856       if (D->getName().find("errno") != StringRef::npos)
tools/clang/lib/StaticAnalyzer/Core/SarifDiagnostics.cpp
   67       StringRef::npos != StringRef("-._~:@!$&'()*+,;=").find(C))
tools/clang/lib/Tooling/Core/Lookup.cpp
  209     return Pos != StringRef::npos ? ReplacementString.substr(Pos + 2)
tools/clang/lib/Tooling/Refactoring/AtomicChange.cpp
   92   StartPos = (StartPos == llvm::StringRef::npos) ? 0 : StartPos + 1;
   95   if (EndPos == llvm::StringRef::npos)
tools/clang/lib/Tooling/Refactoring/Rename/USRLocFinder.cpp
   98     if (Offset != StringRef::npos)
tools/clang/tools/clang-format/ClangFormat.cpp
  259   while ((Index = Text.find_first_of("\n\r<&", From)) != StringRef::npos) {
tools/clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp
  541     if (ReadChars == FC.npos)
  549     if (TripleEnd == FC.npos)
  565     if (TripleEnd != FC.npos)
tools/clang/tools/clang-refactor/TestSupport.cpp
  170           (LastLine == StringRef::npos ? Offset : Offset - LastLine) + 1};
  271          (NewlinePos == StringRef::npos ? ColumnOffset : (unsigned)NewlinePos);
  282     if (NewlinePos == StringRef::npos)
  290       Source, LineStart == StringRef::npos ? 0 : LineStart + 1, Column - 1);
tools/clang/tools/driver/driver.cpp
  119              Edit.slice(2, Edit.size()-1).find('/') != StringRef::npos) {
tools/clang/tools/extra/clang-change-namespace/ChangeNamespace.cpp
  215   if (DeclName.find(':') == llvm::StringRef::npos)
tools/clang/tools/extra/clang-include-fixer/find-all-symbols/PragmaCommentHandler.cpp
   26   if (Pos == StringRef::npos)
tools/clang/tools/extra/clang-query/QueryParser.cpp
   63         WordCompletionPos(StringRef::npos) {
   76     if (WordCompletionPos == StringRef::npos)
tools/clang/tools/extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
  269   if (NolintIndex == StringRef::npos)
  277     if (BracketEndIndex != StringRef::npos) {
tools/clang/tools/extra/clang-tidy/GlobList.cpp
   37     else if (MetaChars.find(C) != StringRef::npos)
tools/clang/tools/extra/clang-tidy/abseil/AbseilMatcher.h
   47   if (PrefixPosition == StringRef::npos)
tools/clang/tools/extra/clang-tidy/android/CloexecCheck.cpp
   90   if (!ModeStr || (ModeStr->getString().find(Mode) != StringRef::npos))
tools/clang/tools/extra/clang-tidy/llvm/HeaderGuardCheck.cpp
   28   if (PosInclude != StringRef::npos)
   33   if (PosToolsClang != StringRef::npos)
   40   if (PosLLVMProject != StringRef::npos)
   45   if (PosLLVM != StringRef::npos)
tools/clang/tools/extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
  177   if (LAngle == StringRef::npos) {
tools/clang/tools/extra/clang-tidy/modernize/RawStringLiteralCheck.cpp
   24   if (BackSlash == StringRef::npos)
   27   while (BackSlash != StringRef::npos) {
   28     if (Escapes.find(HayStack[BackSlash + 1]) == StringRef::npos)
   39   assert(QuotePos != StringRef::npos);
   68                         : (")" + Delimiter + R"(")")) != StringRef::npos;
tools/clang/tools/extra/clang-tidy/objc/PropertyDeclarationCheck.cpp
   90   assert(Start != llvm::StringRef::npos && Start + 1 < PropertyName.size());
tools/clang/tools/extra/clang-tidy/performance/InefficientAlgorithmCheck.cpp
   79       IneffContName.find("unordered") != llvm::StringRef::npos;
   80   const bool Maplike = IneffContName.find("map") != llvm::StringRef::npos;
   95         (IneffContName.find("map") == llvm::StringRef::npos) ? 1 : 2;
  111   if (Unordered && AlgDecl->getName().find("bound") != llvm::StringRef::npos)
tools/clang/tools/extra/clang-tidy/readability/BracesAroundStatementsCheck.cpp
  100     if (Comment.startswith("/*") && Comment.find('\n') != StringRef::npos) {
tools/clang/tools/extra/clang-tidy/readability/ConvertMemberFunctionsToStatic.cpp
  119   if (Offset == StringRef::npos)
tools/clang/tools/extra/clang-tidy/readability/NamedParameterCheck.cpp
   78     if (Data.find("/*") != StringRef::npos)
tools/clang/tools/extra/clang-tidy/readability/UppercaseLiteralSuffixCheck.cpp
  146     if (Skip == StringRef::npos)
  157   if (Skip == StringRef::npos)
tools/clang/tools/extra/clang-tidy/utils/HeaderGuard.cpp
  149     if (FindEscapedNewline != StringRef::npos &&
tools/clang/tools/extra/clang-tidy/utils/UsingInserter.cpp
   24   if (LastSeparatorPos == StringRef::npos)
tools/clang/tools/extra/clangd/CodeComplete.cpp
 1403       if (PrevNL == StringRef::npos) {
tools/clang/tools/extra/clangd/CodeCompletionStrings.cpp
   56   return CommentText.find_first_not_of("/*-= \t\r\n") != llvm::StringRef::npos;
tools/clang/tools/extra/clangd/Format.cpp
   66     if (I != StringRef::npos)
tools/clang/tools/extra/clangd/FormattedString.cpp
   31     if (Next == llvm::StringRef::npos)
   49     if (Next == llvm::StringRef::npos)
tools/clang/tools/extra/clangd/SourceCode.cpp
  167     if (NextNL == llvm::StringRef::npos)
  192   size_t StartOfLine = (PrevNL == llvm::StringRef::npos) ? 0 : (PrevNL + 1);
  602   size_t StartOfLine = (PrevNL == llvm::StringRef::npos) ? 0 : (PrevNL + 1);
  608   if (Pos == llvm::StringRef::npos)
tools/clang/tools/extra/clangd/URI.cpp
  169   if (Pos == llvm::StringRef::npos)
tools/clang/tools/extra/clangd/index/Serialization.cpp
  220     if (Len == llvm::StringRef::npos)
tools/clang/tools/extra/clangd/refactor/tweaks/RawStringLiteral.cpp
   70   return Content.find_first_of("\"\n\t") != StringRef::npos;
tools/clang/tools/extra/clangd/unittests/TestIndex.cpp
   20   if (Pos == llvm::StringRef::npos) {
   44   if (Pos == llvm::StringRef::npos) {
tools/clang/tools/extra/modularize/CoverageChecker.cpp
  384     if ((file.find("\\.") != StringRef::npos) ||
  385         (file.find("/.") != StringRef::npos))
tools/clang/unittests/AST/CommentTextTest.cpp
   35     assert(CommentStartOffset != llvm::StringRef::npos);
tools/clang/unittests/Driver/ModuleCacheTest.cpp
   24   EXPECT_TRUE(Path.find("org.llvm.clang") != Path.npos);
tools/clang/unittests/Sema/CodeCompleteTest.cpp
   97   size_t StartOfLine = (PrevNL == StringRef::npos) ? 0 : (PrevNL + 1);
tools/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp
 1017       Text = Text.slice(End, StringRef::npos);
 1031     Text = Text.slice(ModLength, StringRef::npos);
 1066         if (End == StringRef::npos)
 1072         Text = Text.slice(End, StringRef::npos);
tools/dsymutil/DwarfLinker.cpp
 1445   if (FirstSpace == StringRef::npos)
 1462     if (OpenParens != StringRef::npos) {
tools/gold/gold-plugin.cpp
  677          options::thinlto_object_suffix_replace.find(";") != StringRef::npos);
  831   assert(PrefixReplace.empty() || PrefixReplace.find(";") != StringRef::npos);
tools/lld/COFF/Driver.cpp
  407   bool hasPathSep = (filename.find_first_of("/\\") != StringRef::npos);
  973     if ((firstMark = altPath.find('%', cursor)) == StringRef::npos ||
  974         (secondMark = altPath.find('%', firstMark + 1)) == StringRef::npos) {
tools/lld/COFF/PDB.cpp
 1376     bool hasWS = a.find(' ') != StringRef::npos;
 1377     bool hasQ = a.find('"') != StringRef::npos;
tools/lld/ELF/Driver.cpp
 1328       if (pos == StringRef::npos)
tools/lld/ELF/InputSection.cpp
 1218   return StringRef::npos;
 1234     if (end == StringRef::npos)
tools/lld/ELF/OutputSections.cpp
  456   if (pos == StringRef::npos)
tools/lld/ELF/ScriptLexer.cpp
   48   if (pos != StringRef::npos)
  103       if (e == StringRef::npos) {
  146       if (e == StringRef::npos) {
  155       if (e == StringRef::npos)
  185     if (e == StringRef::npos) {
tools/lld/ELF/ScriptParser.cpp
 1383   return s.find_first_of("?*[") != StringRef::npos;
tools/lld/ELF/SymbolTable.cpp
   60   if (pos != StringRef::npos && pos + 1 < name.size() && name[pos + 1] == '@')
tools/lld/ELF/Symbols.cpp
  208   if (pos == 0 || pos == StringRef::npos)
tools/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
  364     assert(seperatorIndex != StringRef::npos);
tools/lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp
  762         if (colonIdx != StringRef::npos) {
tools/lld/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp
  475     if (modStart != StringRef::npos) {
tools/lldb/source/Breakpoint/BreakpointID.cpp
  113   if (str.find_first_of(".- ") != llvm::StringRef::npos) {
tools/lldb/source/Breakpoint/BreakpointIDList.cpp
  160       if (pos != llvm::StringRef::npos) {
  334     if (idx == llvm::StringRef::npos)
tools/lldb/source/Commands/CommandCompletions.cpp
  112     if (FirstSep != llvm::StringRef::npos)
  120       if (FirstSep == llvm::StringRef::npos) {
  135     if (FirstSep == llvm::StringRef::npos) {
tools/lldb/source/Commands/CommandObjectWatchpoint.cpp
   62     if (Arg.find(RSA[i]) != llvm::StringRef::npos)
tools/lldb/source/Core/FormatEntity.cpp
  514   close_bracket_index = llvm::StringRef::npos;
  516   if (open_bracket_index == llvm::StringRef::npos) {
  524   if (close_bracket_index == llvm::StringRef::npos) {
  539       if (separator_index == llvm::StringRef::npos) {
  734   size_t close_bracket_index = llvm::StringRef::npos;
  917     if (close_bracket_index != llvm::StringRef::npos &&
 1880       (sep_pos == llvm::StringRef::npos) ? '\0' : format_str[sep_pos];
 1995     if (non_special_chars == llvm::StringRef::npos) {
 2286   if (paren_pos != llvm::StringRef::npos) {
 2353   if (dollar_pos == llvm::StringRef::npos)
 2368   if (close_pos != llvm::StringRef::npos)
 2372   if (format_pos != llvm::StringRef::npos)
tools/lldb/source/Core/ValueObject.cpp
 2311       if (next_sep_pos == llvm::StringRef::npos) // if no other separator just
 2500           llvm::StringRef::npos) // if there is no ], this is a syntax error
tools/lldb/source/Interpreter/CommandInterpreter.cpp
 2509     std::size_t last_space = llvm::StringRef::npos;
 2555     return pos == llvm::StringRef::npos ? S.size() : pos;
tools/lldb/source/Interpreter/OptionValueProperties.cpp
  121   if (key_len != llvm::StringRef::npos) {
  163       if (pos != llvm::StringRef::npos) {
  601   if (key_len != llvm::StringRef::npos) {
tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
 1156     if (name.find(orig_name) != StringRef::npos) {
tools/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
   88                                      size_t pos = llvm::StringRef::npos) {
   90   left_pos = llvm::StringRef::npos;
   94   if (pos == llvm::StringRef::npos || s[pos] == left_char)
  100     if (pos == llvm::StringRef::npos)
  160     if (context_end == llvm::StringRef::npos)
tools/lldb/source/Plugins/Language/CPlusPlus/MSVCUndecoratedNameParser.cpp
   75   return name.find('`') != llvm::StringRef::npos;
tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
 2217     bool has_suffix = version_pos != llvm::StringRef::npos;
tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
 1482             if (value.find('r') != llvm::StringRef::npos)
 1487             if (value.find('w') != llvm::StringRef::npos)
 1492             if (value.find('x') != llvm::StringRef::npos)
tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
  147   if (dot_pos == llvm::StringRef::npos) {
  169   if (dot_pos == llvm::StringRef::npos) {
tools/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
 2851   if (word_sr.find('"') != llvm::StringRef::npos ||
 2852       word_sr.find('\'') != llvm::StringRef::npos)
tools/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
   33         m_next_section_idx(0), m_next_line(llvm::StringRef::npos) {
   44         m_current_line(llvm::StringRef::npos),
   45         m_next_line(llvm::StringRef::npos) {}
   76     if (m_next_line != llvm::StringRef::npos) {
   79         m_next_line = llvm::StringRef::npos;
  105   while (m_next_line != llvm::StringRef::npos ||
  107     if (m_next_line != llvm::StringRef::npos) {
  389   if (pos == llvm::StringRef::npos) {
  397   if (pos == llvm::StringRef::npos)
tools/lldb/source/Symbol/Type.cpp
  681   if (namespace_separator == llvm::StringRef::npos)
  685   while (namespace_separator != llvm::StringRef::npos) {
  686     if (template_begin != llvm::StringRef::npos &&
tools/lldb/source/Target/StackFrame.cpp
  757       if (end_pos == llvm::StringRef::npos) {
tools/lldb/source/Utility/ArchSpec.cpp
  806   if (pos == llvm::StringRef::npos)
tools/lldb/source/Utility/FileSpec.cpp
  128   for (auto i = path.find_first_of("\\/"); i != llvm::StringRef::npos;
tools/lldb/source/Utility/ReproducerInstrumentation.cpp
   30   if (pos == llvm::StringRef::npos)
tools/llvm-cov/CoverageFilters.cpp
   23   return FuncName.find(Name) != StringRef::npos;
tools/llvm-diff/DiffConsumer.cpp
  168     if (percent == StringRef::npos) {
tools/llvm-elfabi/ELFObjHandler.cpp
   49   if (StrEnd == StringLiteral::npos) {
tools/llvm-jitlink/llvm-jitlink.cpp
  642     if (EqIdx == StringRef::npos)
tools/llvm-lto/llvm-lto.cpp
  434          ThinLTOPrefixReplace.find(";") != StringRef::npos);
tools/llvm-objdump/MachODump.cpp
 8001   StringRef PageEncodings = PageData.substr(EncodingsStart, StringRef::npos);
tools/llvm-pdbutil/DumpOutputStyle.cpp
  810     if (Pos == StringRef::npos)
tools/llvm-profdata/llvm-profdata.cpp
  591     else if (SanitizedEntry.find(',') == StringRef::npos)
  863                              Func.Name.find(ShowFunction) != Func.Name.npos);
tools/llvm-rc/ResourceScriptCppFilter.cpp
   45   while (!streamEof() && Pos != StringRef::npos) {
tools/llvm-rc/ResourceScriptToken.cpp
  151   if (Pos == StringRef::npos)
  226     if (EndPos == StringRef::npos)
tools/llvm-readobj/COFFDumper.cpp
 1091             if (EqOrEnd == StringRef::npos)
tools/llvm-rtdyld/llvm-rtdyld.cpp
  605     if (ComaIdx == StringRef::npos)
  710     if (EqualsIdx == StringRef::npos)
unittests/ADT/SmallStringTest.cpp
  119   EXPECT_EQ(StringRef::npos, theString.find('z'));
  120   EXPECT_EQ(StringRef::npos, theString.find("helloworld"));
  123   EXPECT_EQ(StringRef::npos, theString.find("zz"));
  125   EXPECT_EQ(StringRef::npos, theString.find("ll", 3));
  129   EXPECT_EQ(StringRef::npos, theString.rfind('z'));
  130   EXPECT_EQ(StringRef::npos, theString.rfind("helloworld"));
  133   EXPECT_EQ(StringRef::npos, theString.rfind("zz"));
  137   EXPECT_EQ(StringRef::npos, theString.find_first_of("xyz"));
  141   EXPECT_EQ(StringRef::npos, theString.find_first_not_of("hello"));
unittests/ADT/StringRefTest.cpp
  433       {Str, 'z', 0U, StringRef::npos, StringRef::npos},
  433       {Str, 'z', 0U, StringRef::npos, StringRef::npos},
  443       {Str, "helloword", 0, StringRef::npos, StringRef::npos},
  443       {Str, "helloword", 0, StringRef::npos, StringRef::npos},
  446       {Str, "zz", 0, StringRef::npos, StringRef::npos},
  446       {Str, "zz", 0, StringRef::npos, StringRef::npos},
  448       {Str, "ll", 3U, StringRef::npos, 7U},
  471   EXPECT_EQ(StringRef::npos, Str.rfind('z'));
  472   EXPECT_EQ(StringRef::npos, Str.rfind("helloworld"));
  475   EXPECT_EQ(StringRef::npos, Str.rfind("zz"));
  479   EXPECT_EQ(StringRef::npos, Str.rfind_lower('z'));
  480   EXPECT_EQ(StringRef::npos, Str.rfind_lower("HELLOWORLD"));
  483   EXPECT_EQ(StringRef::npos, Str.rfind("ZZ"));
  487   EXPECT_EQ(StringRef::npos, Str.find_first_of("xyz"));
  492   EXPECT_EQ(StringRef::npos, Str.find_first_not_of("hello"));
  496   EXPECT_EQ(StringRef::npos, Str.find_last_not_of("helo"));
 1004   EXPECT_EQ(StringRef::npos, NoPunct.find_if(IsPunct));
 1005   EXPECT_EQ(StringRef::npos, Empty.find_if(IsPunct));
 1008   EXPECT_EQ(StringRef::npos, NoPunct.find_if_not(IsAlpha));
 1009   EXPECT_EQ(StringRef::npos, Empty.find_if_not(IsAlpha));
unittests/ObjectYAML/YAMLTest.cpp
   36   EXPECT_NE(OS.str().find("''"), StringRef::npos);
unittests/Support/VirtualFileSystemTest.cpp
 1357     VersionPlusContent += Content.slice(Content.find('{') + 1, StringRef::npos);
unittests/Support/YAMLIOTest.cpp
  763   EXPECT_NE(llvm::StringRef::npos, flowOut.find("'''aaa"));
  764   EXPECT_NE(llvm::StringRef::npos, flowOut.find("'\"bbb'"));
  765   EXPECT_NE(llvm::StringRef::npos, flowOut.find("'`ccc'"));
  766   EXPECT_NE(llvm::StringRef::npos, flowOut.find("'@ddd'"));
  767   EXPECT_NE(llvm::StringRef::npos, flowOut.find("''\n"));
  768   EXPECT_NE(llvm::StringRef::npos, flowOut.find("'0000000004000000'\n"));
  769   EXPECT_NE(llvm::StringRef::npos, flowOut.find("'true'\n"));
  770   EXPECT_NE(llvm::StringRef::npos, flowOut.find("'FALSE'\n"));
  771   EXPECT_NE(llvm::StringRef::npos, flowOut.find("'~'\n"));
  772   EXPECT_NE(llvm::StringRef::npos, flowOut.find("'0.2e20'\n"));
  773   EXPECT_NE(llvm::StringRef::npos, flowOut.find("'0x30'\n"));
  774   EXPECT_NE(llvm::StringRef::npos, flowOut.find("'- match'\n"));
 1010       if ( byStart != StringRef::npos ) {
 1173     EXPECT_NE(llvm::StringRef::npos, llvm::StringRef(ostr.str()).find("--- |"));
 1313     EXPECT_NE(llvm::StringRef::npos, flowOut.find("one, two"));
 1314     EXPECT_NE(llvm::StringRef::npos, flowOut.find("10, -30, 1024"));
 1359     EXPECT_NE(llvm::StringRef::npos, flowOut.find("- [ 0 ]"));
 1360     EXPECT_NE(llvm::StringRef::npos, flowOut.find("- [ 12, 1, -512 ]"));
 1361     EXPECT_NE(llvm::StringRef::npos, flowOut.find("- [  ]"));
 1870     EXPECT_NE(llvm::StringRef::npos, flowOut.find("{ foo: 42, bar: 907 }"));
 1871     EXPECT_NE(llvm::StringRef::npos, flowOut.find("- { foo: 1, bar: 2 }"));
 1872     EXPECT_NE(llvm::StringRef::npos, flowOut.find("- { foo: 0, bar: 0 }"));
 1873     EXPECT_NE(llvm::StringRef::npos, flowOut.find("- { foo: -1, bar: 1024 }"));
utils/TableGen/AsmMatcherEmitter.cpp
 1033       assert(EndPos != StringRef::npos &&
 1066       StringRef(AsmString).find(CommentDelimiter) != StringRef::npos)
 1081     if (Tok[0] == '$' && Tok.find(':') != StringRef::npos)
utils/TableGen/GlobalISel/CodeExpander.cpp
   26     if (Pos == StringRef::npos) {
utils/TableGen/X86FoldTablesEmitter.cpp
   82     return Inst->TheDef->getName().find(InstStr) != StringRef::npos;
   88     return Inst->TheDef->getName().find(InstStr) != StringRef::npos;
  278   return Op->getName().find("_NOREX") != StringRef::npos;