Home
last modified time | relevance | path

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

123

/external/llvm-project/clang/unittests/Tooling/
DASTSelectionTest.cpp725 ArrayRef<SelectedASTNode::ReferenceType> Parents = in TEST() local
727 EXPECT_EQ(Parents.size(), 3u); in TEST()
729 isa<TranslationUnitDecl>(Parents[0].get().Node.get<Decl>())); in TEST()
731 EXPECT_TRUE(isa<FunctionDecl>(Parents[1].get().Node.get<Decl>())); in TEST()
733 EXPECT_TRUE(isa<CompoundStmt>(Parents[2].get().Node.get<Stmt>())); in TEST()
746 ArrayRef<SelectedASTNode::ReferenceType> Parents = in TEST() local
748 EXPECT_EQ(Parents.size(), 3u); in TEST()
750 isa<TranslationUnitDecl>(Parents[0].get().Node.get<Decl>())); in TEST()
752 EXPECT_TRUE(isa<FunctionDecl>(Parents[1].get().Node.get<Decl>())); in TEST()
754 EXPECT_TRUE(isa<CompoundStmt>(Parents[2].get().Node.get<Stmt>())); in TEST()
[all …]
/external/llvm-project/clang/include/clang/Tooling/Refactoring/
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
/external/llvm-project/clang-tools-extra/clang-tidy/utils/
DExprSequence.cpp33 DynTypedNodeList Parents = Context->getParents(*S); in getParentStmts() local
35 SmallVector<ast_type_traits::DynTypedNode, 1> NodesToProcess(Parents.begin(), in getParentStmts()
36 Parents.end()); in getParentStmts()
45 Parents = Context->getParents(Node); in getParentStmts()
46 NodesToProcess.append(Parents.begin(), Parents.end()); in getParentStmts()
200 SmallVector<const Stmt *, 1> Parents = getParentStmts(S, Context); in blockContainingStmt() local
201 if (Parents.empty()) in blockContainingStmt()
203 S = Parents[0]; in blockContainingStmt()
/external/llvm-project/clang-tools-extra/clang-tidy/bugprone/
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 << (Parents.size() > 1 ? "es" : "") << ParentsStr; in check()
145 if (Parents.size() == 1 && in check()
147 !isa<ClassTemplateSpecializationDecl>(Parents.front())) in check()
150 getNameAsString(Parents.front()) + "::"); in check()
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()
DSuspiciousMissingCommaCheck.cpp27 auto Parents = Ctx->getParents(*Lit); in isConcatenatedLiteralsOnPurpose() local
28 if (Parents.size() == 1 && Parents[0].get<ParenExpr>() != nullptr) in isConcatenatedLiteralsOnPurpose()
/external/llvm-project/clang/lib/Tooling/Refactoring/
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 …]
/external/llvm-project/clang-tools-extra/clangd/unittests/
DTypeHierarchyTests.cpp42 ::testing::Matcher<TypeHierarchyItem> Parents(ParentMatchers... ParentsM) { in Parents() function
337 TEST(TypeHierarchy, Parents) { in TEST() argument
369 AST, Pt, /*ResolveLevels=*/0, TypeHierarchyDirection::Parents); in TEST()
375 Parents(AllOf(WithName("Parent1"), WithKind(SymbolKind::Struct), in TEST()
377 Parents()), in TEST()
380 Parents(AllOf( in TEST()
383 Parents())))))); in TEST()
408 AST, Source.points()[0], 0, TypeHierarchyDirection::Parents); in TEST()
413 Parents( in TEST()
416 Parents(AllOf(WithName("S"), WithKind(SymbolKind::Struct), in TEST()
[all …]
/external/llvm-project/clang/lib/Tooling/Refactoring/Rename/
DUSRLocFinder.cpp354 auto Parents = Context.getParents(Loc); in VisitTypeLoc() local
356 if (!Parents.empty()) { in VisitTypeLoc()
361 if (const auto *NSL = Parents[0].get<NestedNameSpecifierLoc>()) { in VisitTypeLoc()
366 if (const auto *TL = Parents[0].get<TypeLoc>()) in VisitTypeLoc()
465 auto Parents = Context.getParents(Node); in getClosestAncestorDecl() local
467 if (Parents.size() != 1) in getClosestAncestorDecl()
469 if (ASTNodeKind::getFromNodeKind<Decl>().isBaseOf(Parents[0].getNodeKind())) in getClosestAncestorDecl()
470 return Parents[0].template get<Decl>(); in getClosestAncestorDecl()
471 return getClosestAncestorDecl(Parents[0]); in getClosestAncestorDecl()
477 auto Parents = Context.getParents(Loc); in getParentTypeLoc() local
[all …]
/external/llvm-project/clang/lib/AST/
DParentMapContext.cpp26 void ParentMapContext::clear() { Parents.reset(); } in clear()
235 void addParent(MapNodeTy MapNode, MapTy *Parents) { in addParent() argument
249 auto &NodeOrVector = (*Parents)[MapNode]; in addParent()
281 MapTy *Parents) { in TraverseNode() argument
284 addParent(MapNode, Parents); in TraverseNode()
329 if (!Parents) in getParents()
332 Parents = std::make_unique<ParentMap>(ASTCtx); in getParents()
333 return Parents->getParents(getTraversalKind(), Node); in getParents()
/external/llvm-project/clang-tools-extra/clang-tidy/cppcoreguidelines/
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()
/external/clang/utils/TableGen/
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()
345 const std::vector<Record*> &Parents = DiagGroupParents.getParents(Group); in isSubGroupOfGroup() local
346 for (unsigned i = 0, e = Parents.size(); i != e; ++i) in isSubGroupOfGroup()
347 if (isSubGroupOfGroup(Parents[i], GName)) in isSubGroupOfGroup()
388 const std::vector<Record*> &Parents = DiagGroupParents.getParents(Group); in markGroup() local
389 for (unsigned i = 0, e = Parents.size(); i != e; ++i) in markGroup()
390 markGroup(Parents[i]); in markGroup()
447 const std::vector<Record*> &Parents = DiagGroupParents.getParents(Group); in compute() local
[all …]
/external/llvm-project/clang-tools-extra/clang-tidy/readability/
DUseAnyOfAllOfCheck.cpp24 DynTypedNodeList Parents = Finder->getASTContext().getParents(Node); in AST_MATCHER_P() local
25 if (Parents.size() != 1) in AST_MATCHER_P()
28 auto *C = Parents[0].get<CompoundStmt>(); in AST_MATCHER_P()
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()
/external/llvm-project/clang-tools-extra/clang-tidy/modernize/
DUseNullptrCheck.cpp420 const auto &Parents = Context.getParents(Start); in findContainingAncestor() local
421 if (Parents.empty()) in findContainingAncestor()
423 if (Parents.size() > 1) { in findContainingAncestor()
428 for (const auto &Parent : Parents) { in findContainingAncestor()
434 const ast_type_traits::DynTypedNode &Parent = Parents[0]; in findContainingAncestor()
DLoopConvertCheck.cpp429 auto Parents = Context->getParents(*E); in canBeModified() local
430 if (Parents.size() != 1) in canBeModified()
432 if (const auto *Cast = Parents[0].get<ImplicitCastExpr>()) { in canBeModified()
630 auto Parents = Context->getParents(*Usage.Expression); in doConversion() local
631 if (Parents.size() == 1) { in doConversion()
632 if (const auto *Paren = Parents[0].get<ParenExpr>()) { in doConversion()
637 } else if (const auto *UOP = Parents[0].get<UnaryOperator>()) { in doConversion()
/external/clang/lib/StaticAnalyzer/Checkers/
DTraversalChecker.cpp43 const ParentMap &Parents = C.getLocationContext()->getParentMap(); in checkBranchCondition() local
44 Parent = Parents.getParent(Condition); in checkBranchCondition()
DDeadStoresChecker.cpp129 ParentMap& Parents; member in __anon30eab0fa0211::DeadStoreObs
142 : cfg(cfg), Ctx(ctx), BR(br), Checker(checker), AC(ac), Parents(parents), in DeadStoreObs()
295 DeadStoreKind dsk = Parents.isConsumedExpr(B) in observeStmt()
306 const Stmt *parent = Parents.getParentIgnoreParenCasts(U); in observeStmt()
/external/llvm-project/llvm/lib/CodeGen/AsmPrinter/
DDIEHash.cpp85 SmallVector<const DIE *, 1> Parents; in addParentContext() local
88 Parents.push_back(Cur); in addParentContext()
96 for (SmallVectorImpl<const DIE *>::reverse_iterator I = Parents.rbegin(), in addParentContext()
97 E = Parents.rend(); in addParentContext()
/external/swiftshader/third_party/llvm-10.0/llvm/lib/CodeGen/AsmPrinter/
DDIEHash.cpp86 SmallVector<const DIE *, 1> Parents; in addParentContext() local
89 Parents.push_back(Cur); in addParentContext()
97 for (SmallVectorImpl<const DIE *>::reverse_iterator I = Parents.rbegin(), in addParentContext()
98 E = Parents.rend(); in addParentContext()
/external/llvm-project/clang-tools-extra/unittests/clang-doc/
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()
/external/llvm-project/clang-tools-extra/clang-doc/
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()
/external/llvm-project/clang/lib/StaticAnalyzer/Checkers/
DTraversalChecker.cpp42 const ParentMap &Parents = C.getLocationContext()->getParentMap(); in checkBranchCondition() local
43 Parent = Parents.getParent(Condition); in checkBranchCondition()
/external/llvm/lib/Analysis/
DLazyCallGraph.cpp242 assert(TargetSCC.getOuterRefSCC().Parents.count(this) && in verify()
257 for (const RefSCC *ParentC : AncestorC->Parents) in isDescendantOf()
739 TargetC.Parents.insert(this); in insertOutgoingEdge()
845 for (RefSCC *ParentC : C->Parents) in insertIncomingRefEdge()
847 Parents.insert(ParentC); in insertIncomingRefEdge()
848 C->Parents.clear(); in insertIncomingRefEdge()
865 ChildRC.Parents.erase(C); in insertIncomingRefEdge()
866 ChildRC.Parents.insert(this); in insertIncomingRefEdge()
942 bool Removed = TargetRC.Parents.erase(this); in removeOutgoingEdge()
949 if (TargetRC.Parents.empty()) in removeOutgoingEdge()
[all …]
/external/llvm/lib/CodeGen/AsmPrinter/
DDIEHash.cpp87 SmallVector<const DIE *, 1> Parents; in addParentContext() local
90 Parents.push_back(Cur); in addParentContext()
98 for (SmallVectorImpl<const DIE *>::reverse_iterator I = Parents.rbegin(), in addParentContext()
99 E = Parents.rend(); in addParentContext()

123