Home
last modified time | relevance | path

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

/external/llvm-project/clang-tools-extra/clangd/
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) {
DSelection.cpp37 using Node = SelectionTree::Node;
41 void recordMetrics(const SelectionTree &S, const LangOptions &Lang) { in recordMetrics()
151 constexpr SelectionTree::Selection NoTokens =
152 static_cast<SelectionTree::Selection>(
153 static_cast<unsigned char>(SelectionTree::Complete + 1));
157 void update(SelectionTree::Selection &Result, SelectionTree::Selection New) { in update()
164 Result = SelectionTree::Partial; in update()
246 S.Selected = SelectionTree::Complete; in SelectionTester()
248 S.Selected = SelectionTree::Partial; in SelectionTester()
254 SelectionTree::Selection
[all …]
DSemanticSelection.cpp115 SelectionTree ST = SelectionTree::createRight( in getSemanticRanges()
DXRefs.cpp181 auto ResultFromTree = [&](SelectionTree ST) { in getDeclAtPositionWithRelations()
182 if (const SelectionTree::Node *N = ST.commonAncestor()) { in getDeclAtPositionWithRelations()
190 SelectionTree::createEach(AST.getASTContext(), AST.getTokens(), Offset, in getDeclAtPositionWithRelations()
987 std::vector<SourceLocation> relatedControlFlow(const SelectionTree::Node &N) { in relatedControlFlow()
1098 auto TryTree = [&](SelectionTree ST) { in findDocumentHighlights()
1099 if (const SelectionTree::Node *N = ST.commonAncestor()) { in findDocumentHighlights()
1123 SelectionTree::createEach(AST.getASTContext(), AST.getTokens(), Offset, in findDocumentHighlights()
1500 [](const SelectionTree::Node *N) -> const CXXRecordDecl * { in findRecordTypeAt()
1538 SelectionTree::createEach(AST.getASTContext(), AST.getTokens(), *Offset, in findRecordTypeAt()
1539 *Offset, [&](SelectionTree ST) { in findRecordTypeAt()
DClangdServer.cpp440 SelectionTree::createEach( in tweakSelection()
442 [&](SelectionTree T) { in tweakSelection()
792 bool Success = SelectionTree::createEach( in getAST()
794 [&](SelectionTree T) { in getAST()
795 if (const SelectionTree::Node *N = T.commonAncestor()) { in getAST()
DHover.cpp369 llvm::Optional<std::string> printExprValue(const SelectionTree::Node *N, in printExprValue()
716 void maybeAddCalleeArgInfo(const SelectionTree::Node *N, HoverInfo &HI, in maybeAddCalleeArgInfo()
848 SelectionTree ST = in getHover()
849 SelectionTree::createRight(AST.getASTContext(), TB, Offset, Offset); in getHover()
851 if (const SelectionTree::Node *N = ST.commonAncestor()) { in getHover()
/external/llvm-project/clang-tools-extra/clangd/unittests/
DSelectionTests.cpp27 SelectionTree makeSelectionTree(const StringRef MarkedCode, ParsedAST &AST) { in makeSelectionTree()
32 return SelectionTree::createRight(AST.getASTContext(), AST.getTokens(), in makeSelectionTree()
36 return SelectionTree::createRight( in makeSelectionTree()
42 return SelectionTree::createRight(AST.getASTContext(), AST.getTokens(), 0u, in makeSelectionTree()
47 Range nodeRange(const SelectionTree::Node *N, ParsedAST &AST) { in nodeRange()
63 std::string nodeKind(const SelectionTree::Node *N) { in nodeKind()
67 std::vector<const SelectionTree::Node *> allNodes(const SelectionTree &T) { in allNodes()
68 std::vector<const SelectionTree::Node *> Result = {&T.root()}; in allNodes()
70 const SelectionTree::Node *N = Result[I]; in allNodes()
78 bool verifyCommonAncestor(const SelectionTree::Node &Root, in verifyCommonAncestor()
[all …]
DFindTargetTests.cpp79 auto Selection = SelectionTree::createRight( in assertNodeAndPrintDecls()
81 const SelectionTree::Node *N = Selection.commonAncestor(); in assertNodeAndPrintDecls()
/external/llvm-project/clang-tools-extra/clangd/refactor/tweaks/
DExtractVariable.cpp38 ExtractionContext(const SelectionTree::Node *Node, const SourceManager &SM,
41 const SelectionTree::Node *getExprNode() const { return ExprNode; } in getExprNode()
55 const SelectionTree::Node *ExprNode;
86 ExtractionContext::ExtractionContext(const SelectionTree::Node *Node, in ExtractionContext()
122 [](const SelectionTree::Node *InsertionPoint) -> bool { in computeInsertionPoint()
142 for (const SelectionTree::Node *CurNode = getExprNode(); in computeInsertionPoint()
205 llvm::SmallVector<const SelectionTree::Node*, 8> SelectedOperands;
208 bool parse(const SelectionTree::Node &N) { in parse()
256 for (const SelectionTree::Node *Child : SelectedOperands) in crossesMacroBoundary()
275 const SourceRange getBinaryOperatorRange(const SelectionTree::Node &N, in getBinaryOperatorRange()
[all …]
DExpandAutoType.cpp58 bool isStructuredBindingType(const SelectionTree::Node *N) { in isStructuredBindingType()
68 bool isDeducedAsLambda(const SelectionTree::Node *Node, SourceLocation Loc) { in isDeducedAsLambda()
DExtractFunction.cpp82 using Node = SelectionTree::Node;
101 if (N->Selected == SelectionTree::Partial) in isRootStmt()
105 if (N->Selected == SelectionTree::Unselected && !N->ASTNode.get<DeclStmt>()) in isRootStmt()
125 case SelectionTree::Selection::Unselected: in getParentOfRootStmts()
130 case SelectionTree::Selection::Partial: in getParentOfRootStmts()
133 case SelectionTree::Selection::Complete: in getParentOfRootStmts()
DDefineInline.cpp86 const FunctionDecl *getSelectedFunction(const SelectionTree::Node *SelNode) { in getSelectedFunction()
91 SelNode->Selected == SelectionTree::Complete) { in getSelectedFunction()
92 if (const SelectionTree::Node *P = SelNode->Parent) in getSelectedFunction()
407 const SelectionTree::Node *SelNode = Sel.ASTSelection.commonAncestor(); in prepare()
DDefineOutline.cpp51 const FunctionDecl *getSelectedFunction(const SelectionTree::Node *SelNode) { in getSelectedFunction()
58 SelNode->Selected == SelectionTree::Complete) { in getSelectedFunction()
59 if (const SelectionTree::Node *P = SelNode->Parent) in getSelectedFunction()
DObjCLocalizeStringLiteral.cpp53 const SelectionTree::Node *N = Inputs.ASTSelection.commonAncestor(); in REGISTER_TWEAK()
DRawStringLiteral.cpp83 const SelectionTree::Node *N = Inputs.ASTSelection.commonAncestor(); in prepare()
DSwapIfBranches.cpp54 for (const SelectionTree::Node *N = Inputs.ASTSelection.commonAncestor(); in REGISTER_TWEAK()
DPopulateSwitch.cpp87 const SelectionTree::Node *CA = Sel.ASTSelection.commonAncestor(); in REGISTER_TWEAK()
DRemoveUsingNamespace.cpp91 bool isTopLevelDecl(const SelectionTree::Node *Node) { in isTopLevelDecl()
/external/llvm-project/clang-tools-extra/clangd/refactor/
DTweak.h51 unsigned RangeEnd, SelectionTree ASTSelection);
66 SelectionTree ASTSelection;
DTweak.cpp50 SelectionTree ASTSelection) in Selection()
DRename.cpp158 SelectionTree Selection = SelectionTree::createRight( in locateDeclAt()
160 const SelectionTree::Node *SelectedNode = Selection.commonAncestor(); in locateDeclAt()
/external/llvm-project/clang-tools-extra/clangd/unittests/tweaks/
DTweakTesting.cpp74 SelectionTree::createEach(AST.getASTContext(), AST.getTokens(), Range.first, in applyTweak()
75 Range.second, [&](SelectionTree ST) { in applyTweak()
/external/llvm-project/clang-tools-extra/clangd/tool/
DCheck.cpp202 auto Tree = SelectionTree::createRight(AST->getASTContext(), in testLocationFeatures()