| /llvm-project-15.0.7/clang/include/clang/ASTMatchers/ |
| H A D | ASTMatchers.h | 319 auto& Context = Finder->getASTContext(); in AST_POLYMORPHIC_MATCHER_P() 1003 return InnerMatcher.matches(*E, Finder, Builder); 3867 .matches(Node, Finder, Builder); 4027 .matches(Node, Finder, Builder); 4088 .matches(Node, Finder, Builder); 4135 .matches(Node, Finder, Builder); 4143 .matches(Node, Finder, Builder); 4411 if (!Finder->isTraversalIgnoringImplicitNodes()) in AST_POLYMORPHIC_MATCHER_P() 4835 Finder, &ArgMatches)) { in AST_POLYMORPHIC_MATCHER_P2() 5736 .matches(Node, Finder, Builder); in AST_POLYMORPHIC_MATCHER_P() [all …]
|
| H A D | ASTMatchersInternal.h | 374 ASTMatchFinder *Finder, 612 ASTMatchFinder *Finder, 852 if (Matcher.matches(*I, Finder, &Result)) { 868 if (Matcher.matches(**I, Finder, &Result)) { 1000 bool matches(const T &Node, ASTMatchFinder *Finder, 1110 ASTMatchFinder *Finder, 1116 ASTMatchFinder *Finder, 1124 ASTMatchFinder *Finder, 1132 ASTMatchFinder *Finder, 1140 ASTMatchFinder *Finder, [all …]
|
| H A D | ASTMatchFinder.h | 304 MatchFinder Finder; in match() local 305 Finder.addMatcher(Matcher, &Callback); in match() 306 Finder.match(Node, Context); in match() 320 MatchFinder Finder; in match() local 321 Finder.addMatcher(Matcher, &Callback); in match() 322 Finder.matchAST(Context); in match() 330 MatchFinder Finder; in matchDynamic() local 331 Finder.addDynamicMatcher(Matcher, &Callback); in matchDynamic() 332 Finder.match(Node, Context); in matchDynamic() 346 MatchFinder Finder; in matchDynamic() local [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/readability/ |
| H A D | RedundantSmartptrGetCheck.cpp | 52 void registerMatchersForGetArrowStart(MatchFinder *Finder, in registerMatchersForGetArrowStart() argument 65 Finder->addMatcher(memberExpr(expr().bind("memberExpr"), isArrow(), in registerMatchersForGetArrowStart() 70 Finder->addMatcher( in registerMatchersForGetArrowStart() 77 Finder->addMatcher( in registerMatchersForGetArrowStart() 82 Finder->addMatcher(ifStmt(hasCondition(CallToGetAsBool)), Callback); in registerMatchersForGetArrowStart() 88 Finder->addMatcher(cxxDependentScopeMemberExpr(hasObjectExpression( in registerMatchersForGetArrowStart() 93 void registerMatchersForGetEquals(MatchFinder *Finder, in registerMatchersForGetEquals() argument 101 Finder->addMatcher( in registerMatchersForGetEquals() 118 void RedundantSmartptrGetCheck::registerMatchers(MatchFinder *Finder) { in registerMatchers() argument 119 registerMatchersForGetArrowStart(Finder, this); in registerMatchers() [all …]
|
| H A D | RedundantStringCStrCheck.cpp | 71 ast_matchers::MatchFinder *Finder) { in registerMatchers() argument 100 Finder->addMatcher( in registerMatchers() 110 Finder->addMatcher( in registerMatchers() 121 Finder->addMatcher( in registerMatchers() 128 Finder->addMatcher( in registerMatchers() 135 Finder->addMatcher( in registerMatchers() 142 Finder->addMatcher( in registerMatchers() 152 Finder->addMatcher( in registerMatchers() 159 Finder->addMatcher( in registerMatchers()
|
| /llvm-project-15.0.7/llvm/lib/Analysis/ |
| H A D | ModuleDebugInfoPrinter.cpp | 30 DebugInfoFinder Finder; member in __anon32d610b00111::ModuleDebugInfoLegacyPrinter 57 Finder.processModule(M); in runOnModule() 75 const DebugInfoFinder &Finder) { in printModuleDebugInfo() argument 79 for (DICompileUnit *CU : Finder.compile_units()) { in printModuleDebugInfo() 90 for (DISubprogram *S : Finder.subprograms()) { in printModuleDebugInfo() 98 for (auto *GVU : Finder.global_variables()) { in printModuleDebugInfo() 107 for (const DIType *T : Finder.types()) { in printModuleDebugInfo() 137 printModuleDebugInfo(O, M, Finder); in print() 145 Finder.processModule(M); in run() 146 printModuleDebugInfo(OS, &M, Finder); in run()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/ |
| H A D | DanglingHandleCheck.cpp | 104 void DanglingHandleCheck::registerMatchersForVariables(MatchFinder *Finder) { in registerMatchersForVariables() argument 108 Finder->addMatcher( in registerMatchersForVariables() 117 Finder->addMatcher( in registerMatchersForVariables() 128 Finder->addMatcher( in registerMatchersForVariables() 137 Finder->addMatcher( in registerMatchersForVariables() 142 void DanglingHandleCheck::registerMatchersForReturn(MatchFinder *Finder) { in registerMatchersForReturn() argument 144 Finder->addMatcher( in registerMatchersForReturn() 169 Finder->addMatcher( in registerMatchersForReturn() 178 void DanglingHandleCheck::registerMatchers(MatchFinder *Finder) { in registerMatchers() argument 179 registerMatchersForVariables(Finder); in registerMatchers() [all …]
|
| H A D | SizeofExpressionCheck.cpp | 32 if (InnerMatcher.matches(*E, Finder, Builder)) in AST_MATCHER_P2() 37 return M.matches(*CE->getSubExpr(), Finder, Builder); in AST_MATCHER_P2() 41 return M.matches(*UE->getSubExpr(), Finder, Builder); in AST_MATCHER_P2() 46 return LHS.matches(*BE->getLHS(), Finder, Builder) || in AST_MATCHER_P2() 47 RHS.matches(*BE->getRHS(), Finder, Builder); in AST_MATCHER_P2() 102 Finder->addMatcher( in registerMatchers() 128 Finder->addMatcher( in registerMatchers() 181 Finder->addMatcher( in registerMatchers() 207 Finder->addMatcher( in registerMatchers() 225 Finder->addMatcher( in registerMatchers() [all …]
|
| H A D | SuspiciousStringCompareCheck.cpp | 85 void SuspiciousStringCompareCheck::registerMatchers(MatchFinder *Finder) { in registerMatchers() argument 112 Finder->addMatcher( in registerMatchers() 124 Finder->addMatcher(unaryOperator(hasOperatorName("!"), in registerMatchers() 132 Finder->addMatcher( in registerMatchers() 140 Finder->addMatcher( in registerMatchers() 155 Finder->addMatcher( in registerMatchers()
|
| /llvm-project-15.0.7/clang/unittests/ASTMatchers/ |
| H A D | ASTMatchersInternalTest.cpp | 62 MatchFinder Finder; 176 return Finder->matchesChildOf( in AST_POLYMORPHIC_MATCHER_P() 204 MatchFinder Finder(std::move(Options)); in TEST() local 210 Finder.addMatcher(decl(), &Callback); in TEST() 212 newFrontendActionFactory(&Finder)); in TEST() 230 MatchFinder Finder; in TEST() local 234 newFrontendActionFactory(&Finder)); in TEST() 241 Finder.matchAST(AST->getASTContext()); in TEST() 256 MatchFinder Finder; in TEST() local 260 newFrontendActionFactory(&Finder)); in TEST() [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/cppcoreguidelines/ |
| H A D | OwningMemoryCheck.cpp | 31 void OwningMemoryCheck::registerMatchers(MatchFinder *Finder) { in registerMatchers() argument 62 Finder->addMatcher( in registerMatchers() 76 Finder->addMatcher( in registerMatchers() 86 Finder->addMatcher( in registerMatchers() 94 Finder->addMatcher( in registerMatchers() 113 Finder->addMatcher( in registerMatchers() 127 Finder->addMatcher( in registerMatchers() 135 Finder->addMatcher( in registerMatchers() 143 Finder->addMatcher(callExpr(forEachArgumentWithParam( in registerMatchers() 151 Finder->addMatcher( in registerMatchers() [all …]
|
| H A D | ProBoundsArrayToPointerDecayCheck.cpp | 24 if (Stmt != nullptr && InnerMatcher.matches(*Stmt, Finder, Builder)) in AST_MATCHER_P() 32 .matches(Node, Finder, Builder); in AST_MATCHER() 39 DynTypedNodeList Parents = Finder->getASTContext().getParents(*E); in AST_MATCHER_P() 47 return InnerMatcher.matches(*E, Finder, Builder); in AST_MATCHER_P() 51 void ProBoundsArrayToPointerDecayCheck::registerMatchers(MatchFinder *Finder) { in registerMatchers() argument 56 Finder->addMatcher( in registerMatchers()
|
| H A D | ProBoundsPointerArithmeticCheck.cpp | 19 void ProBoundsPointerArithmeticCheck::registerMatchers(MatchFinder *Finder) { in registerMatchers() argument 30 Finder->addMatcher( in registerMatchers() 37 Finder->addMatcher( in registerMatchers() 43 Finder->addMatcher( in registerMatchers()
|
| H A D | ProTypeVarargCheck.cpp | 69 ASTContext &Context = Finder->getASTContext(); in AST_MATCHER() 114 return InnerType.matches(Node.getOriginalType(), Finder, Builder); in AST_MATCHER_P() 133 void ProTypeVarargCheck::registerMatchers(MatchFinder *Finder) { in registerMatchers() argument 134 Finder->addMatcher(VAArgExpr().bind("va_use"), this); in registerMatchers() 136 Finder->addMatcher( in registerMatchers() 142 Finder->addMatcher( in registerMatchers()
|
| H A D | AvoidNonConstGlobalVariablesCheck.cpp | 24 void AvoidNonConstGlobalVariablesCheck::registerMatchers(MatchFinder *Finder) { in registerMatchers() argument 40 Finder->addMatcher(GlobalVariable.bind("non-const_variable"), this); in registerMatchers() 41 Finder->addMatcher(GlobalReferenceToNonConst.bind("indirection_to_non-const"), in registerMatchers() 43 Finder->addMatcher(GlobalPointerToNonConst.bind("indirection_to_non-const"), in registerMatchers()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/misc/ |
| H A D | UnusedUsingDeclsCheck.cpp | 25 return DeclMatcher.matches(*TD, Finder, Builder); in AST_MATCHER_P() 41 void UnusedUsingDeclsCheck::registerMatchers(MatchFinder *Finder) { in registerMatchers() argument 42 Finder->addMatcher(usingDecl(isExpansionInMainFile()).bind("using"), this); in registerMatchers() 44 Finder->addMatcher(loc(templateSpecializationType(DeclMatcher)), this); in registerMatchers() 45 Finder->addMatcher(loc(deducedTemplateSpecializationType( in registerMatchers() 48 Finder->addMatcher(callExpr(callee(unresolvedLookupExpr().bind("used"))), in registerMatchers() 50 Finder->addMatcher( in registerMatchers() 54 Finder->addMatcher(loc(templateSpecializationType(forEachTemplateArgument( in registerMatchers() 61 Finder->addMatcher(declRefExpr(ThroughShadowMatcher), this); in registerMatchers() 62 Finder->addMatcher(loc(usingType(ThroughShadowMatcher)), this); in registerMatchers()
|
| H A D | NonCopyableObjects.cpp | 20 void NonCopyableObjectsCheck::registerMatchers(MatchFinder *Finder) { in registerMatchers() argument 44 Finder->addMatcher( in registerMatchers() 48 Finder->addMatcher(parmVarDecl(BadPOSIXType).bind("decl"), this); in registerMatchers() 49 Finder->addMatcher( in registerMatchers()
|
| /llvm-project-15.0.7/clang/lib/ASTMatchers/ |
| H A D | ASTMatchersInternal.cpp | 53 ASTMatchFinder *Finder, 287 ASTMatchFinder *Finder, in matches() argument 289 TraversalKindScope RAII(Finder->getASTContext(), in matches() 292 if (Finder->isTraversalIgnoringImplicitNodes() && in matches() 296 if (!Finder->isTraversalIgnoringImplicitNodes() && in matches() 297 Finder->IsMatchingInASTNodeNotAsIs()) in matches() 317 TraversalKindScope raii(Finder->getASTContext(), in matchesNoKindCheck() 320 if (Finder->isTraversalIgnoringImplicitNodes() && in matchesNoKindCheck() 324 if (!Finder->isTraversalIgnoringImplicitNodes() && in matchesNoKindCheck() 325 Finder->IsMatchingInASTNodeNotAsIs()) in matchesNoKindCheck() [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/performance/ |
| H A D | TypePromotionInMathFnCheck.cpp | 48 void TypePromotionInMathFnCheck::registerMatchers(MatchFinder *Finder) { in registerMatchers() argument 70 Finder->addMatcher( in registerMatchers() 81 Finder->addMatcher( in registerMatchers() 90 Finder->addMatcher( in registerMatchers() 101 Finder->addMatcher( in registerMatchers() 113 Finder->addMatcher( in registerMatchers() 123 Finder->addMatcher( in registerMatchers() 135 Finder->addMatcher( in registerMatchers() 144 Finder->addMatcher( in registerMatchers()
|
| /llvm-project-15.0.7/clang/unittests/AST/ |
| H A D | DeclMatcher.h | 33 MatchFinder Finder; in match() local 34 Finder.addMatcher(AMatcher.bind(""), this); in match() 35 Finder.matchAST(D->getASTContext()); in match() 65 MatchFinder Finder; in match() local 66 Finder.addMatcher(AMatcher.bind(""), this); in match() 67 Finder.matchAST(D->getASTContext()); in match()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/abseil/ |
| H A D | UpgradeDurationConversionsCheck.cpp | 21 void UpgradeDurationConversionsCheck::registerMatchers(MatchFinder *Finder) { in registerMatchers() argument 32 Finder->addMatcher( in registerMatchers() 47 Finder->addMatcher( in registerMatchers() 61 Finder->addMatcher( in registerMatchers() 75 Finder->addMatcher( in registerMatchers() 102 Finder->addMatcher( in registerMatchers()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/modernize/ |
| H A D | UseUncaughtExceptionsCheck.cpp | 20 void UseUncaughtExceptionsCheck::registerMatchers(MatchFinder *Finder) { in registerMatchers() argument 24 Finder->addMatcher( in registerMatchers() 30 Finder->addMatcher( in registerMatchers() 39 Finder->addMatcher(callExpr(DirectCallToUncaughtException, in registerMatchers() 45 Finder->addMatcher(callExpr(DirectCallToUncaughtException, in registerMatchers()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/hicpp/ |
| H A D | NoAssemblerCheck.cpp | 26 void NoAssemblerCheck::registerMatchers(MatchFinder *Finder) { in registerMatchers() argument 27 Finder->addMatcher(asmStmt().bind("asm-stmt"), this); in registerMatchers() 28 Finder->addMatcher(fileScopeAsmDecl().bind("asm-file-scope"), this); in registerMatchers() 29 Finder->addMatcher(varDecl(isAsm()).bind("asm-var"), this); in registerMatchers()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/objc/ |
| H A D | MissingHashCheck.cpp | 24 return Base.matches(*InterfaceDecl, Finder, Builder); in AST_MATCHER_P() 31 if (Base.matches(*I, Finder, Builder)) in AST_MATCHER_P() 39 void MissingHashCheck::registerMatchers(MatchFinder *Finder) { in registerMatchers() argument 40 Finder->addMatcher( in registerMatchers()
|
| /llvm-project-15.0.7/clang-tools-extra/unittests/clang-tidy/ |
| H A D | ClangTidyTest.h | 52 ast_matchers::MatchFinder &Finder, 54 : Checks(Checks), Finder(Finder), Context(Context) {} 74 Check->registerMatchers(&Finder); 77 return Finder.newASTConsumer(); 81 ast_matchers::MatchFinder &Finder; 119 ast_matchers::MatchFinder Finder; 128 std::make_unique<TestClangTidyAction<CheckTypes...>>(Checks, Finder,
|