Home
last modified time | relevance | path

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

/llvm-project-15.0.7/clang-tools-extra/clangd/
H A DSelection.h76 class SelectionTree {
88 llvm::function_ref<bool(SelectionTree)> Func);
94 static SelectionTree createRight(ASTContext &AST,
99 SelectionTree(const SelectionTree &) = delete;
100 SelectionTree &operator=(const SelectionTree &) = delete;
102 SelectionTree(SelectionTree &&) = default;
103 SelectionTree &operator=(SelectionTree &&) = default;
153 SelectionTree(ASTContext &AST, const syntax::TokenBuffer &Tokens,
162 const SelectionTree &T) {
H A DSelection.cpp40 using Node = SelectionTree::Node;
181 void update(SelectionTree::Selection &Result, SelectionTree::Selection New) { in update()
188 Result = SelectionTree::Partial; in update()
293 SelectionTree::Selection
425 SelectionTree::Selection
493 SelectionTree::Selection Result = in testTokenRange()
985 void SelectionTree::print(llvm::raw_ostream &OS, const SelectionTree::Node &N, in print()
1039 SelectionTree SelectionTree::createRight(ASTContext &AST, in createRight()
1050 SelectionTree::SelectionTree(ASTContext &AST, const syntax::TokenBuffer &Tokens, in SelectionTree() function in clang::clangd::SelectionTree
1092 const SelectionTree::Node &SelectionTree::Node::ignoreImplicit() const { in ignoreImplicit()
[all …]
H A DSemanticSelection.cpp122 SelectionTree ST = SelectionTree::createRight( in getSemanticRanges()
H A DXRefs.cpp175 auto ResultFromTree = [&](SelectionTree ST) { in getDeclAtPositionWithRelations()
176 if (const SelectionTree::Node *N = ST.commonAncestor()) { in getDeclAtPositionWithRelations()
191 SelectionTree::createEach(AST.getASTContext(), AST.getTokens(), Offset, in getDeclAtPositionWithRelations()
1242 auto TryTree = [&](SelectionTree ST) { in findDocumentHighlights()
1243 if (const SelectionTree::Node *N = ST.commonAncestor()) { in findDocumentHighlights()
1268 SelectionTree::createEach(AST.getASTContext(), AST.getTokens(), Offset, in findDocumentHighlights()
1743 auto RecordFromNode = [&AST](const SelectionTree::Node *N) { in findRecordTypeAt()
1785 SelectionTree::createEach(AST.getASTContext(), AST.getTokens(), *Offset, in findRecordTypeAt()
1786 *Offset, [&](SelectionTree ST) { in findRecordTypeAt()
1795 static QualType typeForNode(const SelectionTree::Node *N) { in typeForNode()
[all …]
H A DHover.cpp452 llvm::Optional<std::string> printExprValue(const SelectionTree::Node *N, in printExprValue()
874 void maybeAddCalleeArgInfo(const SelectionTree::Node *N, HoverInfo &HI, in maybeAddCalleeArgInfo()
1030 SelectionTree ST = in getHover()
1031 SelectionTree::createRight(AST.getASTContext(), TB, Offset, Offset); in getHover()
1032 if (const SelectionTree::Node *N = ST.commonAncestor()) { in getHover()
H A DClangdServer.cpp601 SelectionTree::createEach( in tweakSelection()
603 [&](SelectionTree T) { in tweakSelection()
976 bool Success = SelectionTree::createEach( in getAST()
978 [&](SelectionTree T) { in getAST()
979 if (const SelectionTree::Node *N = T.commonAncestor()) { in getAST()
/llvm-project-15.0.7/clang-tools-extra/clangd/unittests/
H A DSelectionTests.cpp36 return SelectionTree::createRight( in makeSelectionTree()
63 std::string nodeKind(const SelectionTree::Node *N) { in nodeKind()
67 std::vector<const SelectionTree::Node *> allNodes(const SelectionTree &T) { in allNodes()
70 const SelectionTree::Node *N = Result[I]; in allNodes()
581 TEST(SelectionTree, Metrics) { in TEST() argument
637 if (N->Selected == SelectionTree::Complete) in TEST()
732 SelectionTree::createEach( in TEST()
749 [&](SelectionTree T) { in TEST()
758 [&](SelectionTree T) { in TEST()
767 [&](SelectionTree T) { in TEST()
[all …]
H A DFeatureModulesTests.cpp50 SelectionTree::createRight(AST.getASTContext(), AST.getTokens(), 0, 0); in TEST()
H A DFindTargetTests.cpp79 auto Selection = SelectionTree::createRight( in assertNodeAndPrintDecls()
81 const SelectionTree::Node *N = Selection.commonAncestor(); in assertNodeAndPrintDecls()
/llvm-project-15.0.7/clang-tools-extra/clangd/refactor/tweaks/
H A DExtractVariable.cpp55 const SelectionTree::Node *ExprNode;
153 [](const SelectionTree::Node *InsertionPoint) -> bool { in computeInsertionPoint()
173 for (const SelectionTree::Node *CurNode = getExprNode(); in computeInsertionPoint()
239 bool parse(const SelectionTree::Node &N) { in parse()
354 const SelectionTree::Node *getCallExpr(const SelectionTree::Node *DeclRef) { in getCallExpr()
356 const SelectionTree::Node *MaybeCall = MaybeCallee.Parent; in getCallExpr()
395 bool eligibleForExtraction(const SelectionTree::Node *N) { in eligibleForExtraction()
456 const SelectionTree::Node *computeExtractedExpr(const SelectionTree::Node *N) { in computeExtractedExpr()
459 const SelectionTree::Node *TargetNode = N; in computeExtractedExpr()
466 if (const SelectionTree::Node *Call = getCallExpr(N)) in computeExtractedExpr()
[all …]
H A DExpandAutoType.cpp54 bool isStructuredBindingType(const SelectionTree::Node *N) { in isStructuredBindingType()
64 bool isDeducedAsLambda(const SelectionTree::Node *Node, SourceLocation Loc) { in isDeducedAsLambda()
83 bool isTemplateParam(const SelectionTree::Node *Node) { in isTemplateParam()
H A DObjCMemberwiseInitializer.cpp186 paramsForSelection(const SelectionTree::Node *N);
197 const SelectionTree::Node *N = Inputs.ASTSelection.commonAncestor(); in REGISTER_TWEAK()
236 ObjCMemberwiseInitializer::paramsForSelection(const SelectionTree::Node *N) { in paramsForSelection()
267 const SelectionTree::Node *N = Inputs.ASTSelection.commonAncestor(); in apply()
H A DDefineInline.cpp70 const FunctionDecl *getSelectedFunction(const SelectionTree::Node *SelNode) { in getSelectedFunction()
75 SelNode->Selected == SelectionTree::Complete) { in getSelectedFunction()
76 if (const SelectionTree::Node *P = SelNode->Parent) in getSelectedFunction()
400 const SelectionTree::Node *SelNode = Sel.ASTSelection.commonAncestor(); in prepare()
H A DPopulateSwitch.cpp86 const SelectionTree::Node *CA = Sel.ASTSelection.commonAncestor(); in REGISTER_TWEAK()
98 if (const SelectionTree::Node *Parent = CA->outerImplicit().Parent) in REGISTER_TWEAK()
H A DExtractFunction.cpp81 using Node = SelectionTree::Node;
106 if (N->Selected == SelectionTree::Partial) in isRootStmt()
110 if (N->Selected == SelectionTree::Unselected && !N->ASTNode.get<DeclStmt>()) in isRootStmt()
130 case SelectionTree::Selection::Unselected: in getParentOfRootStmts()
135 case SelectionTree::Selection::Partial: in getParentOfRootStmts()
138 case SelectionTree::Selection::Complete: in getParentOfRootStmts()
H A DDefineOutline.cpp48 const FunctionDecl *getSelectedFunction(const SelectionTree::Node *SelNode) { in getSelectedFunction()
55 SelNode->Selected == SelectionTree::Complete) { in getSelectedFunction()
56 if (const SelectionTree::Node *P = SelNode->Parent) in getSelectedFunction()
H A DObjCLocalizeStringLiteral.cpp49 const SelectionTree::Node *N = Inputs.ASTSelection.commonAncestor(); in REGISTER_TWEAK()
H A DRawStringLiteral.cpp75 const SelectionTree::Node *N = Inputs.ASTSelection.commonAncestor(); in prepare()
H A DSwapIfBranches.cpp51 for (const SelectionTree::Node *N = Inputs.ASTSelection.commonAncestor(); in REGISTER_TWEAK()
H A DRemoveUsingNamespace.cpp88 bool isTopLevelDecl(const SelectionTree::Node *Node) { in isTopLevelDecl()
/llvm-project-15.0.7/clang-tools-extra/clangd/refactor/
H A DTweak.h51 unsigned RangeEnd, SelectionTree ASTSelection,
67 SelectionTree ASTSelection;
H A DTweak.cpp63 SelectionTree ASTSelection, in Selection()
H A DRename.cpp146 SelectionTree Selection = SelectionTree::createRight( in locateDeclAt()
148 const SelectionTree::Node *SelectedNode = Selection.commonAncestor(); in locateDeclAt()
/llvm-project-15.0.7/clang-tools-extra/clangd/unittests/tweaks/
H A DTweakTesting.cpp67 SelectionTree::createEach(AST.getASTContext(), AST.getTokens(), Range.Begin, in applyTweak()
68 Range.End, [&](SelectionTree ST) { in applyTweak()
/llvm-project-15.0.7/clang-tools-extra/clangd/tool/
H A DCheck.cpp235 auto Tree = SelectionTree::createRight(AST->getASTContext(), in testLocationFeatures()