Home
last modified time | relevance | path

Searched refs:positionToOffset (Results 1 – 16 of 16) sorted by relevance

/llvm-project-15.0.7/clang-tools-extra/clangd/unittests/
H A DSourceCodeTests.cpp104 EXPECT_THAT_EXPECTED(positionToOffset(File, position(0, -1)), in TEST()
106 EXPECT_THAT_EXPECTED(positionToOffset(File, position(0, 0)), in TEST()
108 EXPECT_THAT_EXPECTED(positionToOffset(File, position(0, 3)), in TEST()
110 EXPECT_THAT_EXPECTED(positionToOffset(File, position(0, 6)), in TEST()
112 EXPECT_THAT_EXPECTED(positionToOffset(File, position(0, 7)), in TEST()
116 EXPECT_THAT_EXPECTED(positionToOffset(File, position(0, 8)), in TEST()
123 EXPECT_THAT_EXPECTED(positionToOffset(File, position(1, 0)), in TEST()
125 EXPECT_THAT_EXPECTED(positionToOffset(File, position(1, 3)), in TEST()
129 EXPECT_THAT_EXPECTED(positionToOffset(File, position(1, 6)), in TEST()
131 EXPECT_THAT_EXPECTED(positionToOffset(File, position(1, 7)), in TEST()
[all …]
H A DSelectionTests.cpp31 unsigned Offset = cantFail(positionToOffset(Test.code(), Test.point())); in makeSelectionTree()
38 cantFail(positionToOffset(Test.code(), Test.points()[0])), in makeSelectionTree()
39 cantFail(positionToOffset(Test.code(), Test.points()[1]))); in makeSelectionTree()
H A DSemanticHighlightingTests.cpp47 unsigned StartOffset = llvm::cantFail(positionToOffset(Input, T.R.start)); in annotate()
48 unsigned EndOffset = llvm::cantFail(positionToOffset(Input, T.R.end)); in annotate()
H A DFormatTests.cpp25 unsigned Cursor = llvm::cantFail(positionToOffset(Code.code(), Code.point())); in afterTyped()
H A DCodeCompleteTests.cpp2573 auto Offset = cantFail(positionToOffset(F.code(), F.point())); in TEST()
2575 return F.code().slice(cantFail(positionToOffset(F.code(), R.start)), in TEST()
2576 cantFail(positionToOffset(F.code(), R.end))); in TEST()
/llvm-project-15.0.7/clang-tools-extra/clangd/refactor/tweaks/
H A DAnnotateHighlightings.cpp67 auto InsertOffset = positionToOffset(Inputs.Code, Token.R.start); in REGISTER_TWEAK()
H A DDefineOutline.cpp304 auto Offset = positionToOffset(Contents, Region.EligiblePoints.back()); in getInsertionPoint()
/llvm-project-15.0.7/clang-tools-extra/clangd/
H A DClangdServer.cpp472 llvm::Expected<size_t> Begin = positionToOffset(*Code, Rng->start); in formatFile()
475 llvm::Expected<size_t> End = positionToOffset(*Code, Rng->end); in formatFile()
509 llvm::Expected<size_t> CursorPos = positionToOffset(*Code, Pos); in formatOnType()
594 auto Begin = positionToOffset(AST.Inputs.Contents, Sel.start); in tweakSelection()
597 auto End = positionToOffset(AST.Inputs.Contents, Sel.end); in tweakSelection()
968 if (auto Offset = positionToOffset(Inputs->Inputs.Contents, R->start)) in getAST()
972 if (auto Offset = positionToOffset(Inputs->Inputs.Contents, R->end)) in getAST()
H A DSourceCode.h63 positionToOffset(llvm::StringRef Code, Position P,
H A DSourceCode.cpp172 llvm::Expected<size_t> positionToOffset(llvm::StringRef Code, Position P, in positionToOffset() function
457 positionToOffset(Code, P, /*AllowColumnsBeyondLineLength=*/false); in sourceLocationInMainFile()
1070 llvm::Expected<size_t> StartIndex = positionToOffset(Contents, Start, false); in applyChange()
1075 llvm::Expected<size_t> EndIndex = positionToOffset(Contents, End, false); in applyChange()
H A DSemanticSelection.cpp116 auto Offset = positionToOffset(SM.getBufferData(FID), Pos); in getSemanticRanges()
H A DSemanticHighlighting.cpp424 auto StartOfLine = positionToOffset(MainCode, Position{Line, 0}); in collect()
982 auto TokStartOffset = llvm::cantFail(positionToOffset(Code, Tok.R.start)); in toSemanticTokens()
H A DCodeComplete.cpp2034 auto Offset = positionToOffset(ParseInput.Contents, Pos); in codeComplete()
2069 auto Offset = positionToOffset(ParseInput.Contents, Pos); in signatureHelp()
H A DXRefs.cpp1780 auto Offset = positionToOffset(SM.getBufferData(SM.getMainFileID()), Pos); in findRecordTypeAt()
1962 auto Offset = positionToOffset(SM.getBufferData(SM.getMainFileID()), Pos); in findType()
H A DClangdLSPServer.cpp1689 auto Offset = positionToOffset(*Code, Params.position, in shouldRunCompletion()
/llvm-project-15.0.7/clang-tools-extra/clangd/refactor/
H A DRename.cpp754 auto StartOffset = positionToOffset(MainFileCode, CurrentIdentifier.start); in rename()
755 auto EndOffset = positionToOffset(MainFileCode, CurrentIdentifier.end); in rename()
827 positionToOffset(InitialCode.substr(LastOffset), Shifted); in buildRenameEdit()