Home
last modified time | relevance | path

Searched refs:Pos (Results 1 – 25 of 395) sorted by relevance

12345678910>>...16

/llvm-project/compiler-rt/lib/fuzzer/
H A DFuzzerIOWindows.cpp92 size_t Pos = Path.find_last_of("/\\"); in Basename() local
93 if (Pos == std::string::npos) return Path; in Basename()
94 assert(Pos < Path.size()); in Basename()
95 return Path.substr(Pos + 1); in Basename()
263 size_t Pos = Offset; in ParseFileName() local
265 for(; Pos < End && !IsSeparator(FileName[Pos]); ++Pos) in ParseFileName()
267 return Pos - Offset; in ParseFileName()
273 size_t Pos = Offset; in ParseDir() local
275 if (Pos >= End || IsSeparator(FileName[Pos])) in ParseDir()
277 for(; Pos < End && !IsSeparator(FileName[Pos]); ++Pos) in ParseDir()
[all …]
H A DFuzzerUtil.cpp98 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()
104 U->push_back(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()
[all …]
/llvm-project/clang/include/clang/Basic/
H A DJsonSupport.h34 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()
46 if (TempPos != Str.find("\\\\", Pos)) { in JsonFormat()
47 Str.insert(Pos, "\\"); in JsonFormat()
48 ++Pos; // As we insert the backslash move plus one. in JsonFormat()
51 ++Pos; in JsonFormat()
55 Pos = 0; in JsonFormat()
57 Pos = Str.find('\"', Pos); in JsonFormat()
[all …]
/llvm-project/llvm/include/llvm/Transforms/IPO/
H A DWholeProgramDevirt.h46 std::pair<uint8_t *, uint8_t *> getPtrToData(uint64_t Pos, uint8_t Size) { in getPtrToData()
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()
56 void setLE(uint64_t Pos, uint64_t Val, uint8_t Size) { in setLE()
57 assert(Pos % 8 == 0); in setLE()
58 auto DataUsed = getPtrToData(Pos / 8, Size); in setLE()
68 void setBE(uint64_t Pos, uint64_t Val, uint8_t Size) { in setBE()
69 assert(Pos % 8 == 0); in setBE()
[all …]
/llvm-project/llvm/lib/Support/
H A DLineIterator.cpp58 const char *Pos = CurrentLine.end(); in advance() local
59 assert(Pos == Buffer->getBufferStart() || isAtLineEnd(Pos) || *Pos == '\0'); in advance()
61 if (skipIfAtLineEnd(Pos)) in advance()
63 if (!SkipBlanks && isAtLineEnd(Pos)) { in advance()
67 while (skipIfAtLineEnd(Pos)) in advance()
72 if (isAtLineEnd(Pos) && !SkipBlanks) in advance()
74 if (*Pos == CommentMarker) in advance()
76 ++Pos; in advance()
77 } while (*Pos != '\0' && !isAtLineEnd(Pos)); in advance()
78 if (!skipIfAtLineEnd(Pos)) in advance()
[all …]
H A DFoldingSet.cpp55 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()
78 unsigned V = ((unsigned char)String[Pos - 1] << 24) | in AddString()
79 ((unsigned char)String[Pos - 2] << 16) | in AddString()
[all …]
H A DFileUtilities.cpp54 static const char *BackupNumber(const char *Pos, const char *FirstChar) { in BackupNumber() argument
56 if (!isNumberChar(*Pos)) return Pos; in BackupNumber()
60 while (Pos > FirstChar && isNumberChar(Pos[-1])) { in BackupNumber()
62 if (Pos[-1] == '.') { in BackupNumber()
68 --Pos; in BackupNumber()
69 if (Pos > FirstChar && isSignedChar(Pos[0]) && !isExponentChar(Pos[-1])) in BackupNumber()
72 return Pos; in BackupNumber()
78 static const char *EndOfNumber(const char *Pos) { in EndOfNumber() argument
79 while (isNumberChar(*Pos)) in EndOfNumber()
80 ++Pos; in EndOfNumber()
[all …]
/llvm-project/compiler-rt/lib/scudo/standalone/
H A Dflags_parser.cpp59 while (isSeparator(Buffer[Pos])) in skipWhitespace()
60 ++Pos; in skipWhitespace()
64 const uptr NameStart = Pos; in parseFlag()
65 while (Buffer[Pos] != '=' && !isSeparatorOrNull(Buffer[Pos])) in parseFlag()
66 ++Pos; in parseFlag()
67 if (Buffer[Pos] != '=') in parseFlag()
70 const uptr ValueStart = ++Pos; in parseFlag()
72 if (Buffer[Pos] == '\'' || Buffer[Pos] == '"') { in parseFlag()
73 const char Quote = Buffer[Pos++]; in parseFlag()
74 while (Buffer[Pos] != 0 && Buffer[Pos] != Quote) in parseFlag()
[all …]
H A Dstring_utils.cpp33 int Pos = 0; in appendNumber() local
35 RAW_CHECK_MSG(static_cast<uptr>(Pos) < MaxLen, in appendNumber()
37 NumBuffer[Pos++] = static_cast<uptr>(AbsoluteValue % Base); in appendNumber()
40 if (Pos < MinNumberLength) { in appendNumber()
41 memset(&NumBuffer[Pos], 0, in appendNumber()
42 sizeof(NumBuffer[0]) * static_cast<uptr>(MinNumberLength - Pos)); in appendNumber()
43 Pos = MinNumberLength; in appendNumber()
45 RAW_CHECK(Pos > 0); in appendNumber()
46 Pos--; in appendNumber()
47 for (; Pos >= 0 && NumBuffer[Pos] == 0; Pos--) { in appendNumber()
[all …]
/llvm-project/llvm/tools/llvm-rc/
H A DResourceScriptToken.cpp88 Tokenizer(StringRef Input) : Data(Input), DataLength(Input.size()), Pos(0) {} in Tokenizer()
145 size_t DataLength, Pos; member in __anon5a9c36670111::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()
170 return getStringError("Invalid token found at position " + Twine(Pos)); in run()
172 const size_t TokenStart = Pos; in run()
180 RCToken Token(TokenKind, Data.take_front(Pos).drop_front(TokenStart)); in run()
[all …]
H A DResourceScriptCppFilter.cpp38 size_t Pos = 0; member in __anon1ef286cf0111::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/llvm/lib/CodeGen/
H A DAllocationOrder.h46 int Pos = 0; variable
49 Iterator(const AllocationOrder &AO, int Pos) : AO(AO), Pos(Pos) {} in Iterator() argument
52 bool isHint() const { return Pos < 0; } in isHint()
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]))
[all …]
/llvm-project/clang/lib/Frontend/
H A DLayoutOverrideSource.cpp73 StringRef::size_type Pos; in LayoutOverrideSource() local
74 if ((Pos = LineStr.find("struct ")) != StringRef::npos) in LayoutOverrideSource()
75 LineStr = LineStr.substr(Pos + strlen("struct ")); in LayoutOverrideSource()
76 else if ((Pos = LineStr.find("class ")) != StringRef::npos) in LayoutOverrideSource()
77 LineStr = LineStr.substr(Pos + strlen("class ")); in LayoutOverrideSource()
78 else if ((Pos = LineStr.find("union ")) != StringRef::npos) in LayoutOverrideSource()
79 LineStr = LineStr.substr(Pos + strlen("union ")); in LayoutOverrideSource()
90 StringRef::size_type Pos = LineStr.find(" Size:"); in LayoutOverrideSource() local
91 if (Pos != StringRef::npos) { in LayoutOverrideSource()
93 LineStr = LineStr.substr(Pos + strlen(" Size:")); in LayoutOverrideSource()
[all …]
/llvm-project/compiler-rt/lib/gwp_asan/optional/
H A Doptions_parser.cpp57 uintptr_t Pos = 0; member in __anonbe4d66020111::OptionParser
81 while (isSeparator(Buffer[Pos])) in skipWhitespace()
82 ++Pos; in skipWhitespace()
86 const uintptr_t NameStart = Pos; in parseOption()
87 while (Buffer[Pos] != '=' && !isSeparatorOrNull(Buffer[Pos])) in parseOption()
88 ++Pos; in parseOption()
91 if (Buffer[Pos] != '=') { in parseOption()
96 const uintptr_t ValueStart = ++Pos; in parseOption()
98 if (Buffer[Pos] == '\'' || Buffer[Pos] == '"') { in parseOption()
99 const char Quote = Buffer[Pos++]; in parseOption()
[all …]
/llvm-project/clang-tools-extra/clang-tidy/
H A DNoLintDirectiveHandler.cpp83 NoLintToken(NoLintType Type, size_t Pos, in NoLintToken() argument
85 : Type(Type), Pos(Pos), ChecksGlob(std::make_unique<CachedGlobList>( in NoLintToken()
96 size_t Pos; member in clang::tidy::__anon3c781a620111::NoLintToken
116 size_t Pos = 0; in getNoLints() local
117 while (Pos < Buffer.size()) { in getNoLints()
119 const size_t NoLintPos = Buffer.find(NOLINT, Pos); in getNoLints()
125 Pos = NoLintPos + NOLINT.size(); in getNoLints()
126 while (Pos < Buffer.size() && llvm::isAlpha(Buffer[Pos])) in getNoLints()
127 ++Pos; in getNoLints()
131 strToNoLintType(Buffer.slice(NoLintPos, Pos)); in getNoLints()
[all …]
/llvm-project/clang/lib/AST/
H A DCommentParser.cpp50 Position Pos; member in clang::comments::TextTokenRetokenizer
53 return Pos.CurToken >= Toks.size(); in isEnd()
59 const Token &Tok = Toks[Pos.CurToken]; in setupBuffer()
61 Pos.BufferStart = Tok.getText().begin(); in setupBuffer()
62 Pos.BufferEnd = Tok.getText().end(); in setupBuffer()
63 Pos.BufferPtr = Pos.BufferStart; in setupBuffer()
64 Pos.BufferStartLoc = Tok.getLocation(); in setupBuffer()
68 const unsigned CharNo = Pos.BufferPtr - Pos in getSourceLocation()
[all...]
/llvm-project/llvm/lib/Target/Mips/
H A DMipsBranchExpansion.cpp161 MachineBasicBlock::iterator Pos, DebugLoc DL);
381 MachineBasicBlock::iterator Pos, in buildProperJumpMI()
402 BuildMI(*MBB, Pos, DL, TII->get(JumpOp)).addReg(ATReg); in buildProperJumpMI()
415 MachineBasicBlock::iterator Pos; in expandToLongBranch()
469 Pos = LongBrMBB->begin(); in expandToLongBranch()
471 BuildMI(*LongBrMBB, Pos, DL, TII->get(Mips::ADDiu), Mips::SP) in expandToLongBranch()
474 BuildMI(*LongBrMBB, Pos, DL, TII->get(Mips::SW)) in expandToLongBranch()
495 BuildMI(*LongBrMBB, Pos, DL, TII->get(Mips::LONG_BRANCH_LUi), Mips::AT) in expandToLongBranch()
507 LongBrMBB->insert(Pos, ADDiuInstr); in expandToLongBranch()
508 LongBrMBB->insert(Pos, BalInst in expandToLongBranch()
379 buildProperJumpMI(MachineBasicBlock * MBB,MachineBasicBlock::iterator Pos,DebugLoc DL) buildProperJumpMI() argument
413 MachineBasicBlock::iterator Pos; expandToLongBranch() local
[all...]
/llvm-project/llvm/lib/MC/
H A DStringTableBuilder.cpp87 static int charTailAt(StringPair *P, size_t Pos) { in charTailAt() argument
89 if (Pos >= S.size()) in charTailAt()
91 return (unsigned char)S[S.size() - Pos - 1]; in charTailAt()
96 static void multikeySort(MutableArrayRef<StringPair *> Vec, int Pos) { in multikeySort() argument
104 int Pivot = charTailAt(Vec[0], Pos); in multikeySort()
108 int C = charTailAt(Vec[K], Pos); in multikeySort()
117 multikeySort(Vec.slice(0, I), Pos); in multikeySort()
118 multikeySort(Vec.slice(J), Pos); in multikeySort()
124 ++Pos; in multikeySort()
154 size_t Pos = Size - S.size() - (K != RAW); in finalizeStringTable() local
[all …]
/llvm-project/clang-tools-extra/clangd/unittests/
H A DSourceCodeTests.cpp33 MATCHER_P2(Pos, Line, Col, "") {
41 Position Pos; in position() local
42 Pos.line = Line; in position()
43 Pos.character = Character; in position()
44 return Pos; in position()
238 EXPECT_THAT(offsetToPosition(File, 0), Pos(0, 0)) << "start of file"; in TEST()
239 EXPECT_THAT(offsetToPosition(File, 3), Pos(0, 3)) << "in first line"; in TEST()
240 EXPECT_THAT(offsetToPosition(File, 6), Pos(0, 6)) << "end of first line"; in TEST()
241 EXPECT_THAT(offsetToPosition(File, 7), Pos(0, 7)) << "first newline"; in TEST()
242 EXPECT_THAT(offsetToPosition(File, 8), Pos(1, 0)) << "start of second line"; in TEST()
[all …]
H A DSyncAPI.cpp72 runCodeComplete(ClangdServer &Server, PathRef File, Position Pos, in runCodeComplete() argument
75 Server.codeComplete(File, Pos, Opts, capture(Result)); in runCodeComplete()
80 PathRef File, Position Pos, in runSignatureHelp() argument
83 Server.signatureHelp(File, Pos, DocumentationFormat, capture(Result)); in runSignatureHelp()
88 runLocateSymbolAt(ClangdServer &Server, PathRef File, Position Pos) { in runLocateSymbolAt() argument
90 Server.locateSymbolAt(File, Pos, capture(Result)); in runLocateSymbolAt()
95 runFindDocumentHighlights(ClangdServer &Server, PathRef File, Position Pos) { in runFindDocumentHighlights() argument
97 Server.findDocumentHighlights(File, Pos, capture(Result)); in runFindDocumentHighlights()
102 Position Pos, llvm::StringRef NewName, in runRename() argument
105 Server.rename(File, Pos, NewName, RenameOpts, capture(Result)); in runRename()
[all …]
/llvm-project/clang/lib/StaticAnalyzer/Checkers/
H A DContainerModeling.cpp573 const auto *Pos = getIteratorPosition(State, Iter); in handleInsert() local
574 if (!Pos) in handleInsert()
583 State = invalidateIteratorPositions(State, Pos->getOffset(), BO_GE); in handleInsert()
604 const auto *Pos = getIteratorPosition(State, Iter); in handleErase() local
605 if (!Pos) in handleErase()
615 State = invalidateIteratorPositions(State, Pos->getOffset(), BO_GE); in handleErase()
624 State = invalidateIteratorPositions(State, Pos->getOffset(), BO_EQ); in handleErase()
668 const auto *Pos = getIteratorPosition(State, Iter); in handleEraseAfter() local
669 if (!Pos) in handleEraseAfter()
679 nonloc::SymbolVal(Pos->getOffset()), in handleEraseAfter()
[all …]
H A DIteratorRangeChecker.cpp71 bool isPastTheEnd(ProgramStateRef State, const IteratorPosition &Pos);
72 bool isAheadOfRange(ProgramStateRef State, const IteratorPosition &Pos);
73 bool isBehindPastTheEnd(ProgramStateRef State, const IteratorPosition &Pos);
198 const auto *Pos = getIteratorPosition(State, Val); in verifyDereference() local
199 if (Pos && isPastTheEnd(State, *Pos)) { in verifyDereference()
283 const auto *Pos = getIteratorPosition(C.getState(), Val); in reportBug() local
284 assert(Pos && "Iterator without known position cannot be out-of-range."); in reportBug()
287 R->markInteresting(Pos->getContainer()); in reportBug()
304 bool isPastTheEnd(ProgramStateRef State, const IteratorPosition &Pos) { in isPastTheEnd() argument
305 const auto *Cont = Pos.getContainer(); in isPastTheEnd()
[all …]
H A DIteratorModeling.cpp206 if (const auto *Pos = getIteratorPosition(State, Call.getArgSVal(0))) { in checkPostCall() local
207 State = setIteratorPosition(State, Call.getReturnValue(), *Pos); in checkPostCall()
226 if (const auto *Pos = getIteratorPosition(State, Call.getArgSVal(i))) { in checkPostCall() local
228 Pos->getContainer()); in checkPostCall()
238 const auto *Pos = getIteratorPosition(State, Val); in checkBind() local
239 if (Pos) { in checkBind()
240 State = setIteratorPosition(State, Loc, *Pos); in checkBind()
296 const auto *Pos = getIteratorPosition(State, C.getSVal(MTE->getSubExpr())); in checkPostStmt() local
297 if (!Pos) in checkPostStmt()
299 State = setIteratorPosition(State, C.getSVal(MTE), *Pos); in checkPostStmt()
307 for (const IteratorPosition &Pos : llvm::make_second_range(RegionMap)) { checkLiveSymbols() local
314 for (const IteratorPosition &Pos : llvm::make_second_range(SymbolMap)) { checkLiveSymbols() local
541 const auto *Pos = getIteratorPosition(State, Iter); handleIncrement() local
567 const auto *Pos = getIteratorPosition(State, Iter); handleDecrement() local
594 const auto *Pos = getIteratorPosition(State, Iterator); handleRandomIncrOrDecr() local
741 const auto Pos = Sym.second; printState() local
754 const auto Pos = Reg.second; printState() local
[all...]
/llvm-project/clang-tools-extra/clangd/
H A DXRefs.h52 /// Get definition of symbol at a specified \p Pos.
54 std::vector<LocatedSymbol> locateSymbolAt(ParsedAST &AST, Position Pos,
78 /// Returns highlights for all usages of a symbol at \p Pos.
80 Position Pos);
100 /// Returns implementations at a specified \p Pos:
103 std::vector<LocatedSymbol> findImplementations(ParsedAST &AST, Position Pos,
106 /// Returns symbols for types referenced at \p Pos.
110 std::vector<LocatedSymbol> findType(ParsedAST &AST, Position Pos,
113 /// Returns references of the symbol at a specified \p Pos.
115 ReferencesResult findReferences(ParsedAST &AST, Position Pos, uint32_
[all...]
/llvm-project/libc/src/__support/CPP/
H A Dstring_view.h185 for (size_t Pos = From; Pos < size(); ++Pos)
186 if ((*this)[Pos] == c)
187 return Pos;
205 for (size_t Pos = From; Pos < size(); ++Pos)
206 if ((*this)[Pos] != c)
207 return Pos;
184 for (size_t Pos = From; Pos < size(); ++Pos) global() variable
204 for (size_t Pos = From; Pos < size(); ++Pos) global() variable
[all...]

12345678910>>...16