Home
last modified time | relevance | path

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

123

/llvm-project-15.0.7/clang/unittests/Tooling/
H A DASTSelectionTest.cpp725 ArrayRef<SelectedASTNode::ReferenceType> Parents = in TEST() local
727 EXPECT_EQ(Parents.size(), 3u); in TEST()
746 ArrayRef<SelectedASTNode::ReferenceType> Parents = in TEST() local
748 EXPECT_EQ(Parents.size(), 3u); in TEST()
800 ArrayRef<SelectedASTNode::ReferenceType> Parents = in TEST() local
802 EXPECT_EQ(Parents.size(), 2u); in TEST()
830 EXPECT_EQ(Parents.size(), 4u); in TEST()
860 EXPECT_EQ(Parents.size(), 3u); in TEST()
888 EXPECT_EQ(Parents.size(), 3u); in TEST()
937 EXPECT_EQ(Parents.size(), 4u); in TEST()
[all …]
/llvm-project-15.0.7/clang/include/clang/Tooling/Refactoring/
H A DASTSelection.h101 ArrayRef<SelectedASTNode::ReferenceType> getParents() { return Parents; } in getParents()
138 ArrayRef<SelectedASTNode::ReferenceType> Parents, in CodeRangeASTSelection() argument
140 : SelectedNode(SelectedNode), Parents(Parents.begin(), Parents.end()), in CodeRangeASTSelection()
147 llvm::SmallVector<SelectedASTNode::ReferenceType, 8> Parents; variable
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/utils/
H A DExprSequence.cpp33 DynTypedNodeList Parents = Context->getParents(*S); in getParentStmts() local
35 SmallVector<DynTypedNode, 1> NodesToProcess(Parents.begin(), Parents.end()); in getParentStmts()
44 Parents = Context->getParents(Node); in getParentStmts()
45 NodesToProcess.append(Parents.begin(), Parents.end()); in getParentStmts()
199 SmallVector<const Stmt *, 1> Parents = getParentStmts(S, Context); in blockContainingStmt() local
200 if (Parents.empty()) in blockContainingStmt()
202 S = Parents[0]; in blockContainingStmt()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/
H A DParentVirtualCallCheck.cpp123 const BasesVector Parents = in check() local
126 if (Parents.empty()) in check()
130 ParentsStr.reserve(30 * Parents.size()); in check()
131 for (const CXXRecordDecl *Parent : Parents) { in check()
142 << static_cast<unsigned>(Parents.size()) << ParentsStr; in check()
145 if (Parents.size() == 1 && in check()
147 !isa<ClassTemplateSpecializationDecl>(Parents.front())) in check()
150 getNameAsString(Parents.front()) + "::"); in check()
H A DMultipleStatementMacroCheck.cpp25 auto Parents = Result.Context->getParents(*S); in nextStmt() local
26 if (Parents.empty()) in nextStmt()
28 const auto *Parent = Parents[0].get<Stmt>(); in nextStmt()
H A DSuspiciousMissingCommaCheck.cpp27 auto Parents = Ctx->getParents(*Lit); in isConcatenatedLiteralsOnPurpose() local
28 if (Parents.size() == 1 && Parents[0].get<ParenExpr>() != nullptr) in isConcatenatedLiteralsOnPurpose()
H A DSmartPtrArrayMismatchCheck.cpp27 const DynTypedNodeList Parents = in isInSingleDeclStmt() local
29 for (const DynTypedNode &PNode : Parents) in isInSingleDeclStmt()
/llvm-project-15.0.7/clang/lib/Tooling/Refactoring/
H A DASTSelection.cpp252 llvm::SmallVector<SelectedASTNode::ReferenceType, 8> Parents; member
292 const Stmt *Parent = Parents[Parents.size() - 1].get().Node.get<Stmt>(); in canonicalize()
298 for (; (ParentIndex + 1) <= Parents.size() && isa<ImplicitCastExpr>(Parent); in canonicalize()
301 Parents[Parents.size() - ParentIndex - 1].get().Node.get<Stmt>(); in canonicalize()
309 Node = Parents[Parents.size() - ParentIndex]; in canonicalize()
311 Parents.pop_back(); in canonicalize()
397 return CodeRangeASTSelection(Selected.Node, Selected.Parents, in create()
408 Selected.Parents.push_back(Selected.Node); in create()
409 return CodeRangeASTSelection(Selected.Node, Selected.Parents, in create()
423 for (const auto &Parent : llvm::reverse(Parents)) { in isInFunctionLikeBodyOfCode()
[all …]
/llvm-project-15.0.7/clang-tools-extra/pseudo/lib/
H A DGLR.cpp244 Parents.clear(); in glrShift()
248 Parents.push_back(Base.second); in glrShift()
250 Rest = Rest.drop_front(Parents.size()); in glrShift()
483 std::vector<const GSS::Node *> Parents; member in clang::pseudo::__anonec8d3c1d0411::GLRReduce
531 Parents.clear(); in pushNext()
535 Parents.push_back(Base.second); in pushNext()
694 if (!Parents.empty()) in addNode()
699 GSS::Node *GSS::allocate(unsigned Parents) { in allocate() argument
700 if (FreeList.size() <= Parents) in allocate()
701 FreeList.resize(Parents + 1); in allocate()
[all …]
/llvm-project-15.0.7/clang/lib/Tooling/Refactoring/Rename/
H A DUSRLocFinder.cpp372 auto Parents = Context.getParents(Loc); in VisitTypeLoc() local
374 if (!Parents.empty()) { in VisitTypeLoc()
379 if (const auto *NSL = Parents[0].get<NestedNameSpecifierLoc>()) { in VisitTypeLoc()
384 if (const auto *TL = Parents[0].get<TypeLoc>()) in VisitTypeLoc()
483 auto Parents = Context.getParents(Node); in getClosestAncestorDecl() local
485 if (Parents.size() != 1) in getClosestAncestorDecl()
488 return Parents[0].template get<Decl>(); in getClosestAncestorDecl()
489 return getClosestAncestorDecl(Parents[0]); in getClosestAncestorDecl()
495 auto Parents = Context.getParents(Loc); in getParentTypeLoc() local
497 if (Parents.size() != 1) in getParentTypeLoc()
[all …]
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/cppcoreguidelines/
H A DProBoundsArrayToPointerDecayCheck.cpp39 DynTypedNodeList Parents = Finder->getASTContext().getParents(*E); in AST_MATCHER_P() local
40 if (Parents.size() != 1) in AST_MATCHER_P()
42 E = Parents[0].get<Expr>(); in AST_MATCHER_P()
/llvm-project-15.0.7/clang/lib/AST/
H A DParentMapContext.cpp26 void ParentMapContext::clear() { Parents.reset(); } in clear()
362 void addParent(MapNodeTy MapNode, MapTy *Parents) { in addParent() argument
376 auto &NodeOrVector = (*Parents)[MapNode]; in addParent()
410 MapTy *Parents) { in TraverseNode() argument
413 addParent(MapNode, Parents); in TraverseNode()
469 if (!Parents) in getParents()
472 Parents = std::make_unique<ParentMap>(ASTCtx); in getParents()
473 return Parents->getParents(getTraversalKind(), Node); in getParents()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/readability/
H A DUseAnyOfAllOfCheck.cpp23 DynTypedNodeList Parents = Finder->getASTContext().getParents(Node); in AST_MATCHER_P() local
24 if (Parents.size() != 1) in AST_MATCHER_P()
27 auto *C = Parents[0].get<CompoundStmt>(); in AST_MATCHER_P()
H A DMisleadingIndentationCheck.cpp21 auto Parents = Context->getParents(*If); in getPrecedingIf() local
22 if (Parents.size() != 1) in getPrecedingIf()
24 if (const auto *PrecedingIf = Parents[0].get<IfStmt>()) { in getPrecedingIf()
H A DMakeMemberFunctionConstCheck.cpp62 DynTypedNodeList Parents = Ctxt.getParents(*E); in getParent() local
63 if (Parents.size() != 1) in getParent()
66 return Parents.begin()->get<T>(); in getParent()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/modernize/
H A DUseNullptrCheck.cpp434 const auto &Parents = Context.getParents(Start); in findContainingAncestor() local
435 if (Parents.empty()) in findContainingAncestor()
437 if (Parents.size() > 1) { in findContainingAncestor()
442 for (const auto &Parent : Parents) { in findContainingAncestor()
448 const DynTypedNode &Parent = Parents[0]; in findContainingAncestor()
H A DLoopConvertCheck.cpp398 auto Parents = Context->getParents(*E); in canBeModified() local
399 if (Parents.size() != 1) in canBeModified()
401 if (const auto *Cast = Parents[0].get<ImplicitCastExpr>()) { in canBeModified()
595 auto Parents = Context->getParents(*Usage.Expression); in doConversion() local
596 if (Parents.size() == 1) { in doConversion()
597 if (const auto *Paren = Parents[0].get<ParenExpr>()) { in doConversion()
602 } else if (const auto *UOP = Parents[0].get<UnaryOperator>()) { in doConversion()
/llvm-project-15.0.7/clang-tools-extra/pseudo/include/clang-pseudo/
H A DGLR.h92 llvm::ArrayRef<const Node *> Parents);
104 Node *allocate(unsigned Parents);
/llvm-project-15.0.7/clang-tools-extra/clang-doc/
H A DMDGenerator.cpp238 std::string Parents = genReferenceList(I.Parents); in genMarkdown() local
240 if (!Parents.empty() || !VParents.empty()) { in genMarkdown()
241 if (Parents.empty()) in genMarkdown()
244 writeLine("Inherits from " + Parents, OS); in genMarkdown()
246 writeLine("Inherits from " + Parents + ", " + VParents, OS); in genMarkdown()
/llvm-project-15.0.7/clang-tools-extra/unittests/clang-doc/
H A DClangDocTest.cpp164 ASSERT_EQ(Expected->Parents.size(), Actual->Parents.size()); in CheckRecordInfo()
165 for (size_t Idx = 0; Idx < Actual->Parents.size(); ++Idx) in CheckRecordInfo()
166 CheckReference(Expected->Parents[Idx], Actual->Parents[Idx]); in CheckRecordInfo()
/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/
H A DTraversalChecker.cpp42 const ParentMap &Parents = C.getLocationContext()->getParentMap(); in checkBranchCondition() local
43 Parent = Parents.getParent(Condition); in checkBranchCondition()
H A DErrnoChecker.cpp74 const DynTypedNodeList Parents = ParentCtx.getParents(*S); in isInCondition() local
75 if (Parents.empty()) in isInCondition()
77 const auto *ParentS = Parents[0].get<Stmt>(); in isInCondition()
/llvm-project-15.0.7/clang-tools-extra/clangd/unittests/
H A DTypeHierarchyTests.cpp341 TEST(TypeHierarchy, Parents) { in TEST() argument
373 TypeHierarchyDirection::Parents); in TEST()
412 TypeHierarchyDirection::Parents); in TEST()
446 TypeHierarchyDirection::Parents); in TEST()
457 TypeHierarchyDirection::Parents); in TEST()
560 AST, SourceAnnotations.point(), 1, TypeHierarchyDirection::Parents); in TEST()
799 auto Parents = superTypes(Result.front(), Index.get()); in TEST() local
801 EXPECT_THAT(Parents, HasValue(UnorderedElementsAre( in TEST()
/llvm-project-15.0.7/llvm/lib/DebugInfo/DWARF/
H A DDWARFUnit.cpp407 std::vector<uint32_t> Parents; in extractDIEsToVector() local
416 Parents.push_back(UINT32_MAX); in extractDIEsToVector()
418 Parents.push_back(0); in extractDIEsToVector()
423 assert(Parents.size() > 0 && "Empty parents stack"); in extractDIEsToVector()
424 assert((Parents.back() == UINT32_MAX || Parents.back() <= Dies.size()) && in extractDIEsToVector()
429 Parents.back())) in extractDIEsToVector()
462 Parents.push_back(Dies.size() - 1); in extractDIEsToVector()
470 Parents.pop_back(); in extractDIEsToVector()
478 } while (Parents.size() > 1); in extractDIEsToVector()
/llvm-project-15.0.7/clang/utils/TableGen/
H A DClangDiagnosticsEmitter.cpp71 const std::vector<Record*> &Parents = DiagGroupParents.getParents(Group); in getCategoryFromDiagGroup() local
72 for (unsigned i = 0, e = Parents.size(); i != e; ++i) { in getCategoryFromDiagGroup()
73 CatName = getCategoryFromDiagGroup(Parents[i], DiagGroupParents); in getCategoryFromDiagGroup()
304 const std::vector<Record*> &Parents = DiagGroupParents.getParents(Group); in isSubGroupOfGroup() local
305 for (unsigned i = 0, e = Parents.size(); i != e; ++i) in isSubGroupOfGroup()
306 if (isSubGroupOfGroup(Parents[i], GName)) in isSubGroupOfGroup()
350 for (unsigned i = 0, e = Parents.size(); i != e; ++i) in markGroup()
351 markGroup(Parents[i]); in markGroup()
409 for (unsigned j = 0, ej = Parents.size(); j != ej; ++j) { in compute()
410 if (groupInPedantic(Parents[j])) in compute()
[all …]

123