| /llvm-project-15.0.7/compiler-rt/lib/fuzzer/ |
| H A D | FuzzerIOWindows.cpp | 265 for(; Pos < End && !IsSeparator(FileName[Pos]); ++Pos) in ParseFileName() 275 if (Pos >= End || IsSeparator(FileName[Pos])) in ParseDir() 277 for(; Pos < End && !IsSeparator(FileName[Pos]); ++Pos) in ParseDir() 292 Pos += Res; in ParseServerAndShare() 295 Pos += Res; in ParseServerAndShare() 316 Pos += Res; in ParseLocation() 328 if (Pos < FileName.size() && IsSeparator(FileName[Pos])) { in ParseLocation() 329 ++Pos; in ParseLocation() 331 ++Pos; in ParseLocation() 336 return Pos; in ParseLocation() [all …]
|
| H A D | FuzzerUtil.cpp | 98 for (size_t Pos = L; Pos <= R; Pos++) { in ParseOneDictionaryEntry() local 99 uint8_t V = (uint8_t)Str[Pos]; in ParseOneDictionaryEntry() 103 if (Pos + 1 <= R && (Str[Pos + 1] == '\\' || Str[Pos + 1] == '"')) { in ParseOneDictionaryEntry() 105 Pos++; in ParseOneDictionaryEntry() 109 if (Pos + 3 <= R && Str[Pos + 1] == 'x' in ParseOneDictionaryEntry() 110 && isxdigit(Str[Pos + 2]) && isxdigit(Str[Pos + 3])) { in ParseOneDictionaryEntry() 112 Hex[2] = Str[Pos + 2]; in ParseOneDictionaryEntry() 113 Hex[3] = Str[Pos + 3]; in ParseOneDictionaryEntry() 115 Pos += 3; in ParseOneDictionaryEntry() 139 size_t Pos = 0; in ParseDictionaryFile() local [all …]
|
| /llvm-project-15.0.7/llvm/lib/Support/ |
| H A D | LineIterator.cpp | 57 const char *Pos = CurrentLine.end(); in advance() local 58 assert(Pos == Buffer->getBufferStart() || isAtLineEnd(Pos) || *Pos == '\0'); in advance() 60 if (skipIfAtLineEnd(Pos)) in advance() 66 while (skipIfAtLineEnd(Pos)) in advance() 73 if (*Pos == CommentMarker) in advance() 75 ++Pos; in advance() 76 } while (*Pos != '\0' && !isAtLineEnd(Pos)); in advance() 77 if (!skipIfAtLineEnd(Pos)) in advance() 83 if (*Pos == '\0') { in advance() 92 while (Pos[Length] != '\0' && !isAtLineEnd(&Pos[Length])) { in advance() [all …]
|
| H A D | FoldingSet.cpp | 55 unsigned Pos = 0; in AddString() local 61 Pos = (Units + 1) * 4; in AddString() 69 for (Pos += 4; Pos <= Size; Pos += 4) { in AddString() 70 unsigned V = ((unsigned char)String[Pos - 4] << 24) | in AddString() 71 ((unsigned char)String[Pos - 3] << 16) | in AddString() 72 ((unsigned char)String[Pos - 2] << 8) | in AddString() 73 (unsigned char)String[Pos - 1]; in AddString() 77 for (Pos += 4; Pos <= Size; Pos += 4) { in AddString() 80 ((unsigned char)String[Pos - 3] << 8) | in AddString() 81 (unsigned char)String[Pos - 4]; in AddString() [all …]
|
| /llvm-project-15.0.7/clang/include/clang/Basic/ |
| H A D | JsonSupport.h | 34 size_t Pos = 0; in JsonFormat() local 38 Pos = Str.find('\\', Pos); in JsonFormat() 39 if (Pos == std::string::npos) in JsonFormat() 43 size_t TempPos = (Pos != 0) ? Pos - 1 : 0; in JsonFormat() 47 Str.insert(Pos, "\\"); in JsonFormat() 51 ++Pos; in JsonFormat() 55 Pos = 0; in JsonFormat() 57 Pos = Str.find('\"', Pos); in JsonFormat() 62 size_t TempPos = (Pos != 0) ? Pos - 1 : 0; in JsonFormat() 66 Str.insert(Pos, "\\"); in JsonFormat() [all …]
|
| /llvm-project-15.0.7/llvm/include/llvm/Transforms/IPO/ |
| H A D | WholeProgramDevirt.h | 47 if (Bytes.size() < Pos + Size) { in getPtrToData() 48 Bytes.resize(Pos + Size); in getPtrToData() 49 BytesUsed.resize(Pos + Size); in getPtrToData() 51 return std::make_pair(Bytes.data() + Pos, BytesUsed.data() + Pos); in getPtrToData() 57 assert(Pos % 8 == 0); in setLE() 69 assert(Pos % 8 == 0); in setBE() 79 void setBit(uint64_t Pos, bool b) { in setBit() 82 *DataUsed.first |= 1 << (Pos % 8); in setBit() 84 *DataUsed.second |= 1 << (Pos % 8); in setBit() 170 void setBeforeBit(uint64_t Pos) { in setBeforeBit() [all …]
|
| /llvm-project-15.0.7/compiler-rt/lib/scudo/standalone/ |
| H A D | flags_parser.cpp | 58 ++Pos; in skipWhitespace() 63 while (Buffer[Pos] != '=' && !isSeparatorOrNull(Buffer[Pos])) in parseFlag() 64 ++Pos; in parseFlag() 65 if (Buffer[Pos] != '=') in parseFlag() 70 if (Buffer[Pos] == '\'' || Buffer[Pos] == '"') { in parseFlag() 72 while (Buffer[Pos] != 0 && Buffer[Pos] != Quote) in parseFlag() 73 ++Pos; in parseFlag() 74 if (Buffer[Pos] == 0) in parseFlag() 80 ++Pos; in parseFlag() 103 Pos = 0; in parseString() [all …]
|
| H A D | string_utils.cpp | 42 int Pos = 0; in appendNumber() local 44 RAW_CHECK_MSG(static_cast<uptr>(Pos) < MaxLen, in appendNumber() 49 if (Pos < MinNumberLength) { in appendNumber() 50 memset(&NumBuffer[Pos], 0, in appendNumber() 52 Pos = MinNumberLength; in appendNumber() 54 RAW_CHECK(Pos > 0); in appendNumber() 55 Pos--; in appendNumber() 56 for (; Pos >= 0 && NumBuffer[Pos] == 0; Pos--) { in appendNumber() 57 char c = (PadWithZero || Pos == 0) ? '0' : ' '; in appendNumber() 62 for (; Pos >= 0; Pos--) { in appendNumber() [all …]
|
| /llvm-project-15.0.7/llvm/lib/CodeGen/ |
| H A D | AllocationOrder.h | 46 int Pos = 0; variable 49 Iterator(const AllocationOrder &AO, int Pos) : AO(AO), Pos(Pos) {} in Iterator() argument 56 if (Pos < 0) 57 return AO.Hints.end()[Pos]; 58 assert(Pos < AO.IterationLimit); 59 return AO.Order[Pos]; 65 if (Pos < AO.IterationLimit) 66 ++Pos; 67 while (Pos >= 0 && Pos < AO.IterationLimit && AO.isHint(AO.Order[Pos])) 68 ++Pos; [all …]
|
| /llvm-project-15.0.7/llvm/tools/llvm-rc/ |
| H A D | ResourceScriptToken.cpp | 145 size_t DataLength, Pos; member in __anon727922840111::Tokenizer 149 Pos = Data.find_first_of("\r\n", Pos); in skipCurrentLine() 150 Pos = Data.find_first_not_of("\r\n", Pos); in skipCurrentLine() 152 if (Pos == StringRef::npos) in skipCurrentLine() 153 Pos = DataLength; in skipCurrentLine() 157 Pos = 0; in run() 200 Pos += Amount; in advance() 230 advance(EndPos - Pos); in consumeToken() 283 const char CurChar = Data[Pos]; in canStartIdentifier() 289 const char CurChar = Data[Pos]; in canContinueIdentifier() [all …]
|
| H A D | ResourceScriptCppFilter.cpp | 38 size_t Pos = 0; member in __anon7572396c0111::Filter 45 while (!streamEof() && Pos != StringRef::npos) { in run() 46 size_t LineStart = Pos; in run() 47 Pos = Data.find_first_of("\r\n", Pos); in run() 48 Pos = Data.find_first_not_of("\r\n", Pos); in run() 49 StringRef Line = Data.take_front(Pos).drop_front(LineStart); in run() 103 bool Filter::streamEof() const { return Pos == DataLength; } in streamEof()
|
| /llvm-project-15.0.7/clang/lib/Frontend/ |
| H A D | LayoutOverrideSource.cpp | 60 StringRef::size_type Pos; in LayoutOverrideSource() local 77 StringRef::size_type Pos = LineStr.find(" Size:"); in LayoutOverrideSource() local 78 if (Pos != StringRef::npos) { in LayoutOverrideSource() 89 Pos = LineStr.find("Alignment:"); in LayoutOverrideSource() 90 if (Pos != StringRef::npos) { in LayoutOverrideSource() 101 Pos = LineStr.find("sizeof="); in LayoutOverrideSource() 102 if (Pos != StringRef::npos) { in LayoutOverrideSource() 111 Pos = LineStr.find("align="); in LayoutOverrideSource() 112 if (Pos != StringRef::npos) { in LayoutOverrideSource() 126 Pos = LineStr.find("FieldOffsets: ["); in LayoutOverrideSource() [all …]
|
| /llvm-project-15.0.7/compiler-rt/lib/gwp_asan/optional/ |
| H A D | options_parser.cpp | 57 uintptr_t Pos = 0; member in __anonebc1da5f0111::OptionParser 82 ++Pos; in skipWhitespace() 87 while (Buffer[Pos] != '=' && !isSeparatorOrNull(Buffer[Pos])) in parseOption() 88 ++Pos; in parseOption() 91 if (Buffer[Pos] != '=') { in parseOption() 98 if (Buffer[Pos] == '\'' || Buffer[Pos] == '"') { in parseOption() 100 while (Buffer[Pos] != 0 && Buffer[Pos] != Quote) in parseOption() 101 ++Pos; in parseOption() 111 ++Pos; in parseOption() 121 if (Buffer[Pos] == 0) in parseOptions() [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/ |
| H A D | NoLintDirectiveHandler.cpp | 86 : Type(Type), Pos(Pos), ChecksGlob(std::make_unique<CachedGlobList>( in NoLintToken() 97 size_t Pos; member in clang::tidy::__anon253b0d9f0111::NoLintToken 117 size_t Pos = 0; in getNoLints() local 118 while (Pos < Buffer.size()) { in getNoLints() 126 Pos = NoLintPos + NOLINT.size(); in getNoLints() 127 while (Pos < Buffer.size() && llvm::isAlpha(Buffer[Pos])) in getNoLints() 128 ++Pos; in getNoLints() 138 if (Pos < Buffer.size() && Buffer[Pos] == '(') { in getNoLints() 142 Pos = ClosingBracket + 1; in getNoLints() 165 assert(this->Begin.Pos < End.Pos); in NoLintBlockToken() [all …]
|
| /llvm-project-15.0.7/llvm/lib/Target/Mips/ |
| H A D | MipsBranchExpansion.cpp | 414 MachineBasicBlock::iterator Pos; in expandToLongBranch() local 468 Pos = LongBrMBB->begin(); in expandToLongBranch() 507 LongBrMBB->insert(Pos, BalInstr); in expandToLongBranch() 509 LongBrMBB->insert(Pos, BalInstr); in expandToLongBranch() 514 Pos = BalTgtMBB->begin(); in expandToLongBranch() 591 Pos = LongBrMBB->begin(); in expandToLongBranch() 618 LongBrMBB->insert(Pos, BalInstr); in expandToLongBranch() 620 LongBrMBB->insert(Pos, BalInstr); in expandToLongBranch() 625 Pos = BalTgtMBB->begin(); in expandToLongBranch() 649 Pos = LongBrMBB->begin(); in expandToLongBranch() [all …]
|
| /llvm-project-15.0.7/clang/lib/AST/ |
| H A D | CommentParser.cpp | 50 Position Pos; member in clang::comments::TextTokenRetokenizer 63 Pos.BufferPtr = Pos.BufferStart; in setupBuffer() 68 const unsigned CharNo = Pos.BufferPtr - Pos.BufferStart; in getSourceLocation() 74 assert(Pos.BufferPtr != Pos.BufferEnd); in peek() 80 assert(Pos.BufferPtr != Pos.BufferEnd); in consumeChar() 81 Pos.BufferPtr++; in consumeChar() 82 if (Pos.BufferPtr == Pos.BufferEnd) { in consumeChar() 83 Pos.CurToken++; in consumeChar() 239 if (Pos.BufferPtr != Pos.BufferStart) { in putBackLeftoverTokens() 241 Pos.BufferPtr, Pos.BufferEnd - Pos.BufferPtr, in putBackLeftoverTokens() [all …]
|
| /llvm-project-15.0.7/llvm/lib/MC/ |
| H A D | StringTableBuilder.cpp | 86 static int charTailAt(StringPair *P, size_t Pos) { in charTailAt() argument 88 if (Pos >= S.size()) in charTailAt() 90 return (unsigned char)S[S.size() - Pos - 1]; in charTailAt() 103 int Pivot = charTailAt(Vec[0], Pos); in multikeySort() 107 int C = charTailAt(Vec[K], Pos); in multikeySort() 116 multikeySort(Vec.slice(0, I), Pos); in multikeySort() 117 multikeySort(Vec.slice(J), Pos); in multikeySort() 123 ++Pos; in multikeySort() 153 size_t Pos = Size - S.size() - (K != RAW); in finalizeStringTable() local 154 if (!(Pos & (Alignment - 1))) { in finalizeStringTable() [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/clangd/unittests/ |
| H A D | SourceCodeTests.cpp | 32 MATCHER_P2(Pos, Line, Col, "") { 40 Position Pos; in position() local 41 Pos.line = Line; in position() 42 Pos.character = Character; in position() 43 return Pos; in position() 237 EXPECT_THAT(offsetToPosition(File, 0), Pos(0, 0)) << "start of file"; in TEST() 238 EXPECT_THAT(offsetToPosition(File, 3), Pos(0, 3)) << "in first line"; in TEST() 243 EXPECT_THAT(offsetToPosition(File, 13), Pos(1, 5)) << "in BMP char"; in TEST() 253 EXPECT_THAT(offsetToPosition(File, 29), Pos(2, 9)) << "EOF"; in TEST() 264 EXPECT_THAT(offsetToPosition(File, 13), Pos(1, 5)) << "in BMP char"; in TEST() [all …]
|
| H A D | SyncAPI.cpp | 71 runCodeComplete(ClangdServer &Server, PathRef File, Position Pos, in runCodeComplete() argument 74 Server.codeComplete(File, Pos, Opts, capture(Result)); in runCodeComplete() 82 Server.signatureHelp(File, Pos, DocumentationFormat, capture(Result)); in runSignatureHelp() 87 runLocateSymbolAt(ClangdServer &Server, PathRef File, Position Pos) { in runLocateSymbolAt() argument 89 Server.locateSymbolAt(File, Pos, capture(Result)); in runLocateSymbolAt() 96 Server.findDocumentHighlights(File, Pos, capture(Result)); in runFindDocumentHighlights() 104 Server.rename(File, Pos, NewName, RenameOpts, capture(Result)); in runRename() 109 runPrepareRename(ClangdServer &Server, PathRef File, Position Pos, in runPrepareRename() argument 113 Server.prepareRename(File, Pos, NewName, RenameOpts, capture(Result)); in runPrepareRename() 147 const std::vector<Position> &Pos) { in runSemanticRanges() argument [all …]
|
| /llvm-project-15.0.7/llvm/lib/TableGen/ |
| H A D | TableGenBackend.cpp | 24 size_t Pos = (size_t)OS.tell(); in printLine() local 28 for (size_t i = (size_t)OS.tell() - Pos, e = MAX_LINE_LEN - Suffix.size(); in printLine() 41 size_t Pos = 0U; in emitSourceFileHeader() local 43 size_t Length = std::min(Desc.size() - Pos, MAX_LINE_LEN - PSLen); in emitSourceFileHeader() 44 printLine(OS, Prefix + Desc.substr(Pos, Length), ' ', Suffix); in emitSourceFileHeader() 45 Pos += Length; in emitSourceFileHeader() 46 } while (Pos < Desc.size()); in emitSourceFileHeader()
|
| /llvm-project-15.0.7/clang-tools-extra/clangd/ |
| H A D | XRefs.h | 53 std::vector<LocatedSymbol> locateSymbolAt(ParsedAST &AST, Position Pos, 78 Position Pos); 101 std::vector<LocatedSymbol> findImplementations(ParsedAST &AST, Position Pos, 108 std::vector<LocatedSymbol> findType(ParsedAST &AST, Position Pos); 112 ReferencesResult findReferences(ParsedAST &AST, Position Pos, uint32_t Limit, 116 std::vector<SymbolDetails> getSymbolInfo(ParsedAST &AST, Position Pos); 120 Position Pos); 127 ParsedAST &AST, Position Pos, int Resolve, TypeHierarchyDirection Direction, 144 prepareCallHierarchy(ParsedAST &AST, Position Pos, PathRef TUPath);
|
| H A D | ClangdServer.h | 227 void codeComplete(PathRef File, Position Pos, 237 void locateSymbolAt(PathRef File, Position Pos, 246 void findDocumentHighlights(PathRef File, Position Pos, 250 void findHover(PathRef File, Position Pos, 254 void typeHierarchy(PathRef File, Position Pos, int Resolve, 270 void prepareCallHierarchy(PathRef File, Position Pos, 293 void findImplementations(PathRef File, Position Pos, 297 void findType(PathRef File, Position Pos, 301 void findReferences(PathRef File, Position Pos, uint32_t Limit, 317 void prepareRename(PathRef File, Position Pos, [all …]
|
| /llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/ |
| H A D | IteratorRangeChecker.cpp | 67 bool isPastTheEnd(ProgramStateRef State, const IteratorPosition &Pos); 199 const auto *Pos = getIteratorPosition(State, Val); in verifyDereference() local 200 if (Pos && isPastTheEnd(State, *Pos)) { in verifyDereference() 284 const auto *Pos = getIteratorPosition(C.getState(), Val); in reportBug() local 288 R->markInteresting(Pos->getContainer()); in reportBug() 306 const auto *Cont = Pos.getContainer(); in isPastTheEnd() 313 if (isEqual(State, Pos.getOffset(), End)) { in isPastTheEnd() 322 const auto *Cont = Pos.getContainer(); in isAheadOfRange() 329 if (isLess(State, Pos.getOffset(), Beg)) { in isAheadOfRange() 338 const auto *Cont = Pos.getContainer(); in isBehindPastTheEnd() [all …]
|
| H A D | ContainerModeling.cpp | 569 if (!Pos) in handleInsert() 600 if (!Pos) in handleErase() 664 if (!Pos) in handleEraseAfter() 924 return Pos.getContainer() == Cont; in invalidateAllIteratorPositions() 927 return Pos.invalidate(); in invalidateAllIteratorPositions() 941 return Pos.invalidate(); in invalidateAllIteratorPositionsExcept() 953 return Pos.invalidate(); in invalidateIteratorPositions() 968 return Pos.invalidate(); in invalidateIteratorPositions() 980 return Pos.reAssign(NewCont); in reassignAllIteratorPositions() 995 return Pos.reAssign(NewCont); in reassignAllIteratorPositionsUnless() [all …]
|
| /llvm-project-15.0.7/llvm/include/llvm/LineEditor/ |
| H A D | LineEditor.h | 103 CompletionAction getCompletionAction(StringRef Buffer, size_t Pos) const; 118 virtual CompletionAction complete(StringRef Buffer, size_t Pos) const = 0; 123 CompletionAction complete(StringRef Buffer, size_t Pos) const override; 126 size_t Pos) const = 0; 132 CompletionAction complete(StringRef Buffer, size_t Pos) const override { in complete() 133 return Value(Buffer, Pos); in complete() 142 size_t Pos) const override { in getCompletions() 143 return Value(Buffer, Pos); in getCompletions()
|