Home
last modified time | relevance | path

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

12

/llvm-project-15.0.7/clang/include/clang/AST/
H A DParentMapContext.h53 template <typename NodeT> DynTypedNodeList getParents(const NodeT &Node);
55 DynTypedNodeList getParents(const DynTypedNode &Node);
126 inline DynTypedNodeList ParentMapContext::getParents(const NodeT &Node) { in getParents() function
127 return getParents(DynTypedNode::create(Node)); in getParents()
131 inline DynTypedNodeList ASTContext::getParents(const NodeT &Node) { in getParents() function
132 return getParentMapContext().getParents(Node); in getParents()
136 inline DynTypedNodeList ASTContext::getParents(const DynTypedNode &Node) { in getParents() function
137 return getParentMapContext().getParents(Node); in getParents()
/llvm-project-15.0.7/clang/unittests/AST/
H A DASTContextParentMapTest.cpp94 EXPECT_THAT(Ctx.getParents(Bar), ElementsAre(DynTypedNode::create(Foo))); in TEST()
95 EXPECT_THAT(Ctx.getParents(Foo), ElementsAre(DynTypedNode::create(TU))); in TEST()
96 EXPECT_THAT(Ctx.getParents(Baz), ElementsAre(DynTypedNode::create(TU))); in TEST()
100 EXPECT_THAT(Ctx.getParents(Bar), ElementsAre(DynTypedNode::create(Foo))); in TEST()
101 EXPECT_THAT(Ctx.getParents(Foo), ElementsAre(DynTypedNode::create(TU))); in TEST()
102 EXPECT_THAT(Ctx.getParents(Baz), ElementsAre()); in TEST()
106 EXPECT_THAT(Ctx.getParents(Bar), ElementsAre(DynTypedNode::create(Foo))); in TEST()
107 EXPECT_THAT(Ctx.getParents(Foo), ElementsAre(DynTypedNode::create(TU))); in TEST()
108 EXPECT_THAT(Ctx.getParents(Baz), ElementsAre(DynTypedNode::create(TU))); in TEST()
/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/WebKit/
H A DUncountedLocalVarsChecker.cpp36 auto parent = ASTCtx.getParents(*Var); in isDeclaredInForOrIf()
40 DynTypedNodeList grandParent = ASTCtx.getParents(*DS); in isDeclaredInForOrIf()
85 for (DynTypedNodeList guardianAncestors = ctx.getParents(*MaybeGuardian); in isGuardedScopeEmbeddedInGuardianScope()
87 guardianAncestors = ctx.getParents( in isGuardedScopeEmbeddedInGuardianScope()
107 for (DynTypedNodeList guardedVarAncestors = ctx.getParents(*Guarded); in isGuardedScopeEmbeddedInGuardianScope()
109 guardedVarAncestors = ctx.getParents( in isGuardedScopeEmbeddedInGuardianScope()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/readability/
H A DMagicNumbersCheck.cpp39 return llvm::any_of(Result.Context->getParents(Node), in isUsedToInitializeAConstant()
51 return llvm::any_of(Result.Context->getParents(Node), in isUsedToDefineABitField()
140 Result.Context->getParents(ExprResult), in isConstant()
149 Result.Context->getParents(Parent), in isConstant()
222 llvm::any_of(Result.Context->getParents(Literal), in isBitFieldWidth()
H A DRedundantDeclarationCheck.cpp58 for (const auto &Parent : Result.Context->getParents(*Prev)) in check()
H A DUseAnyOfAllOfCheck.cpp23 DynTypedNodeList Parents = Finder->getASTContext().getParents(Node); in AST_MATCHER_P()
H A DImplicitBoolConversionCheck.cpp105 Parent = Context.getParents(*Parent)[0].get<Stmt>(); in fixGenericExprCastToBool()
228 for (const auto &N : Context.getParents(*Q.front())) { in isCastAllowedInCondition()
H A DMisleadingIndentationCheck.cpp21 auto Parents = Context->getParents(*If); in getPrecedingIf()
H A DMakeMemberFunctionConstCheck.cpp62 DynTypedNodeList Parents = Ctxt.getParents(*E); in getParent()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/
H A DSmartPtrArrayMismatchCheck.cpp28 D->getASTContext().getParentMapContext().getParents(*D); in isInSingleDeclStmt()
38 Ctx.getParentMapContext().getParents(*FoundConstructExpr); in getConstructedVarOrField()
H A DMultipleStatementMacroCheck.cpp25 auto Parents = Result.Context->getParents(*S); in nextStmt()
H A DSuspiciousMissingCommaCheck.cpp27 auto Parents = Ctx->getParents(*Lit); in isConcatenatedLiteralsOnPurpose()
/llvm-project-15.0.7/clang/unittests/Tooling/
H A DASTSelectionTest.cpp726 SelectedCode->getParents(); in TEST()
747 SelectedCode->getParents(); in TEST()
801 SelectedCode->getParents(); in TEST()
829 SelectedCode->getParents(); in TEST()
859 SelectedCode->getParents(); in TEST()
887 SelectedCode->getParents(); in TEST()
936 SelectedCode->getParents(); in TEST()
960 SelectedCode->getParents(); in TEST()
1078 SelectedCode->getParents()[SelectedCode->getParents().size() - 1] in TEST()
/llvm-project-15.0.7/clang/unittests/CrossTU/
H A DCrossTranslationUnitTest.cpp49 Ctx.getParentMapContext().getParents<Decl>(*FD); in HandleTranslationUnit()
96 Ctx.getParentMapContext().getParents<Decl>(*FD); in HandleTranslationUnit()
98 Ctx.getParentMapContext().getParents<Decl>(*NewFD); in HandleTranslationUnit()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/utils/
H A DExprSequence.cpp33 DynTypedNodeList Parents = Context->getParents(*S); in getParentStmts()
44 Parents = Context->getParents(Node); in getParentStmts()
/llvm-project-15.0.7/clang/lib/AST/
H A DParentMapContext.cpp126 DynTypedNodeList getParents(TraversalKind TK, const DynTypedNode &Node) { in getParents() function in ParentMapContext::ParentMap
468 DynTypedNodeList ParentMapContext::getParents(const DynTypedNode &Node) { in getParents() function in ParentMapContext
473 return Parents->getParents(getTraversalKind(), Node); in getParents()
/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()
/llvm-project-15.0.7/clang/lib/Tooling/Refactoring/Rename/
H A DUSRLocFinder.cpp372 auto Parents = Context.getParents(Loc); in VisitTypeLoc()
483 auto Parents = Context.getParents(Node); in getClosestAncestorDecl()
495 auto Parents = Context.getParents(Loc); in getParentTypeLoc()
/llvm-project-15.0.7/clang/include/clang/Tooling/Refactoring/
H A DASTSelection.h101 ArrayRef<SelectedASTNode::ReferenceType> getParents() { return Parents; } in getParents() function
/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/
H A DErrnoChecker.cpp74 const DynTypedNodeList Parents = ParentCtx.getParents(*S); in isInCondition()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/altera/
H A DUnrollLoopsCheck.cpp83 const DynTypedNodeList Parents = Context->getParents<Stmt>(*Statement); in unrollType()
/llvm-project-15.0.7/clang/utils/TableGen/
H A DClangDiagnosticsEmitter.cpp56 const std::vector<Record*> &getParents(const Record *Group) { in getParents() function in __anon3fb232ac0111::DiagGroupParentMap
71 const std::vector<Record*> &Parents = DiagGroupParents.getParents(Group); in getCategoryFromDiagGroup()
304 const std::vector<Record*> &Parents = DiagGroupParents.getParents(Group); in isSubGroupOfGroup()
349 const std::vector<Record*> &Parents = DiagGroupParents.getParents(Group); in markGroup()
408 const std::vector<Record*> &Parents = DiagGroupParents.getParents(Group); in compute()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/modernize/
H A DLoopConvertCheck.cpp398 auto Parents = Context->getParents(*E); in canBeModified()
595 auto Parents = Context->getParents(*Usage.Expression); in doConversion()
H A DMakeSmartPtrCheck.cpp267 for (const auto &Node : Ctx->getParents(*E)) { in replaceNew()
H A DUseNullptrCheck.cpp434 const auto &Parents = Context.getParents(Start); in findContainingAncestor()

12