Lines Matching full:cb
228 Callback<CodeCompleteResult> CB) { in codeComplete() argument
234 auto Task = [Pos, CodeCompleteOpts, File = File.str(), CB = std::move(CB), in codeComplete()
237 return CB(IP.takeError()); in codeComplete()
239 return CB(llvm::make_error<CancelledError>(Reason)); in codeComplete()
269 CB(std::move(Result)); in codeComplete()
278 // the result (e.g. non-index completion, speculation fails), so that `CB` in codeComplete()
292 Callback<SignatureHelp> CB) { in signatureHelp() argument
294 auto Action = [Pos, File = File.str(), CB = std::move(CB), in signatureHelp()
297 return CB(IP.takeError()); in signatureHelp()
301 return CB(error("Failed to parse includes")); in signatureHelp()
307 CB(clangd::signatureHelp(File, Pos, *PreambleData, ParseInput)); in signatureHelp()
316 Callback<tooling::Replacements> CB) { in formatRange() argument
319 return CB(Begin.takeError()); in formatRange()
322 return CB(End.takeError()); in formatRange()
324 std::move(CB)); in formatRange()
328 Callback<tooling::Replacements> CB) { in formatFile() argument
330 formatCode(File, Code, {tooling::Range(0, Code.size())}, std::move(CB)); in formatFile()
335 Callback<std::vector<TextEdit>> CB) { in formatOnType() argument
338 return CB(CursorPos.takeError()); in formatOnType()
341 CB = std::move(CB), this]() mutable { in formatOnType()
346 return CB(Style.takeError()); in formatOnType()
352 return CB(Result); in formatOnType()
360 Callback<RenameResult> CB) { in prepareRename() argument
361 auto Action = [Pos, File = File.str(), CB = std::move(CB), in prepareRename()
365 return CB(InpAST.takeError()); in prepareRename()
380 return CB(Results.takeError()); in prepareRename()
382 return CB(*Results); in prepareRename()
389 Callback<RenameResult> CB) { in rename() argument
393 CB = std::move(CB), Snapshot = std::move(Snapshot), in rename()
399 return CB(InpAST.takeError()); in rename()
410 return CB(R.takeError()); in rename()
421 return CB(std::move(Err)); in rename()
424 return CB(*R); in rename()
453 Callback<std::vector<TweakRef>> CB) { in enumerateTweaks() argument
457 auto Action = [File = File.str(), Sel, CB = std::move(CB), in enumerateTweaks()
461 return CB(InpAST.takeError()); in enumerateTweaks()
464 return CB(Selections.takeError()); in enumerateTweaks()
479 CB(std::move(Res)); in enumerateTweaks()
487 Callback<Tweak::Effect> CB) { in applyTweak() argument
496 CB = std::move(CB), in applyTweak()
499 return CB(InpAST.takeError()); in applyTweak()
502 return CB(Selections.takeError()); in applyTweak()
527 return CB(std::move(*Effect)); in applyTweak()
533 Callback<std::vector<LocatedSymbol>> CB) { in locateSymbolAt() argument
534 auto Action = [Pos, CB = std::move(CB), in locateSymbolAt()
537 return CB(InpAST.takeError()); in locateSymbolAt()
538 CB(clangd::locateSymbolAt(InpAST->AST, Pos, Index)); in locateSymbolAt()
545 PathRef Path, Callback<llvm::Optional<clangd::Path>> CB) { in switchSourceHeader() argument
554 return CB(std::move(CorrespondingFile)); in switchSourceHeader()
555 auto Action = [Path = Path.str(), CB = std::move(CB), in switchSourceHeader()
558 return CB(InpAST.takeError()); in switchSourceHeader()
559 CB(getCorrespondingHeaderOrSource(Path, InpAST->AST, Index)); in switchSourceHeader()
566 Callback<tooling::Replacements> CB) { in formatCode() argument
569 CB = std::move(CB), this]() mutable { in formatCode()
575 return CB(Changed.takeError()); in formatCode()
577 CB(IncludeReplaces.merge(format::reformat( in formatCode()
586 PathRef File, Position Pos, Callback<std::vector<DocumentHighlight>> CB) { in findDocumentHighlights() argument
588 [Pos, CB = std::move(CB)](llvm::Expected<InputsAndAST> InpAST) mutable { in findDocumentHighlights()
590 return CB(InpAST.takeError()); in findDocumentHighlights()
591 CB(clangd::findDocumentHighlights(InpAST->AST, Pos)); in findDocumentHighlights()
599 Callback<llvm::Optional<HoverInfo>> CB) { in findHover() argument
600 auto Action = [File = File.str(), Pos, CB = std::move(CB), in findHover()
603 return CB(InpAST.takeError()); in findHover()
606 CB(clangd::getHover(InpAST->AST, Pos, std::move(Style), Index)); in findHover()
615 Callback<Optional<TypeHierarchyItem>> CB) { in typeHierarchy() argument
616 auto Action = [File = File.str(), Pos, Resolve, Direction, CB = std::move(CB), in typeHierarchy()
619 return CB(InpAST.takeError()); in typeHierarchy()
620 CB(clangd::getTypeHierarchy(InpAST->AST, Pos, Resolve, Direction, Index, in typeHierarchy()
629 Callback<llvm::Optional<TypeHierarchyItem>> CB) { in resolveTypeHierarchy() argument
631 "Resolve Type Hierarchy", "", [=, CB = std::move(CB)]() mutable { in resolveTypeHierarchy()
633 CB(Item); in resolveTypeHierarchy()
638 PathRef File, Position Pos, Callback<std::vector<CallHierarchyItem>> CB) { in prepareCallHierarchy() argument
640 CB = std::move(CB)](Expected<InputsAndAST> InpAST) mutable { in prepareCallHierarchy()
642 return CB(InpAST.takeError()); in prepareCallHierarchy()
643 CB(clangd::prepareCallHierarchy(InpAST->AST, Pos, File)); in prepareCallHierarchy()
650 Callback<std::vector<CallHierarchyIncomingCall>> CB) { in incomingCalls() argument
652 [CB = std::move(CB), Item, this]() mutable { in incomingCalls()
653 CB(clangd::incomingCalls(Item, Index)); in incomingCalls()
664 Callback<std::vector<SymbolInformation>> CB) { in workspaceSymbols() argument
667 [Query = Query.str(), Limit, CB = std::move(CB), this]() mutable { in workspaceSymbols()
668 CB(clangd::getWorkspaceSymbols(Query, Limit, Index, in workspaceSymbols()
674 Callback<std::vector<DocumentSymbol>> CB) { in documentSymbols() argument
676 [CB = std::move(CB)](llvm::Expected<InputsAndAST> InpAST) mutable { in documentSymbols()
678 return CB(InpAST.takeError()); in documentSymbols()
679 CB(clangd::getDocumentSymbols(InpAST->AST)); in documentSymbols()
686 Callback<std::vector<FoldingRange>> CB) { in foldingRanges() argument
688 [CB = std::move(CB)](llvm::Expected<InputsAndAST> InpAST) mutable { in foldingRanges()
690 return CB(InpAST.takeError()); in foldingRanges()
691 CB(clangd::getFoldingRanges(InpAST->AST)); in foldingRanges()
698 PathRef File, Position Pos, Callback<std::vector<LocatedSymbol>> CB) { in findImplementations() argument
699 auto Action = [Pos, CB = std::move(CB), in findImplementations()
702 return CB(InpAST.takeError()); in findImplementations()
703 CB(clangd::findImplementations(InpAST->AST, Pos, Index)); in findImplementations()
710 Callback<ReferencesResult> CB) { in findReferences() argument
711 auto Action = [Pos, Limit, CB = std::move(CB), in findReferences()
714 return CB(InpAST.takeError()); in findReferences()
715 CB(clangd::findReferences(InpAST->AST, Pos, Limit, Index)); in findReferences()
722 Callback<std::vector<SymbolDetails>> CB) { in symbolInfo() argument
724 [Pos, CB = std::move(CB)](llvm::Expected<InputsAndAST> InpAST) mutable { in symbolInfo()
726 return CB(InpAST.takeError()); in symbolInfo()
727 CB(clangd::getSymbolInfo(InpAST->AST, Pos)); in symbolInfo()
735 Callback<std::vector<SelectionRange>> CB) { in semanticRanges() argument
736 auto Action = [Positions, CB = std::move(CB)]( in semanticRanges()
739 return CB(InpAST.takeError()); in semanticRanges()
745 return CB(Range.takeError()); in semanticRanges()
747 CB(std::move(Result)); in semanticRanges()
753 Callback<std::vector<DocumentLink>> CB) { in documentLinks() argument
755 [CB = std::move(CB)](llvm::Expected<InputsAndAST> InpAST) mutable { in documentLinks()
757 return CB(InpAST.takeError()); in documentLinks()
758 CB(clangd::getDocumentLinks(InpAST->AST)); in documentLinks()
765 PathRef File, Callback<std::vector<HighlightingToken>> CB) { in semanticHighlights() argument
767 [CB = std::move(CB)](llvm::Expected<InputsAndAST> InpAST) mutable { in semanticHighlights()
769 return CB(InpAST.takeError()); in semanticHighlights()
770 CB(clangd::getSemanticHighlightings(InpAST->AST)); in semanticHighlights()
777 Callback<llvm::Optional<ASTNode>> CB) { in getAST() argument
779 [R, CB(std::move(CB))](llvm::Expected<InputsAndAST> Inputs) mutable { in getAST()
781 return CB(Inputs.takeError()); in getAST()
786 return CB(Offset.takeError()); in getAST()
790 return CB(Offset.takeError()); in getAST()
796 CB(dumpAST(N->ASTNode, Inputs->AST.getTokens(), in getAST()
803 CB(llvm::None); in getAST()