|
reference, declaration → definition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
|
References
tools/clang/include/clang/ASTMatchers/ASTMatchers.h 2887 return eachOf(Matcher, forEachDescendant(Matcher));
5277 return decl(anyOf(IsInstantiation, hasAncestor(IsInstantiation)));
5296 hasAncestor(decl(anyOf(cxxRecordDecl(isTemplateInstantiation()),
tools/clang/lib/Analysis/ExprMutationAnalyzer.cpp 162 hasAncestor(typeLoc(unless(
163 hasAncestor(unaryExprOrTypeTraitExpr())))),
164 hasAncestor(expr(anyOf(
177 hasDescendant(equalsNode(Exp)))),
238 unless(hasParent(implicitCastExpr(hasCastKind(CK_NoOp)))),
242 unless(hasParent(arraySubscriptExpr())),
243 has(maybeEvalCommaExpr(equalsNode(Exp))));
367 stmt(forEachDescendant(
374 hasParent(declStmt().bind("stmt")),
377 unless(hasParent(declStmt(hasParent(
377 unless(hasParent(declStmt(hasParent(
tools/clang/lib/StaticAnalyzer/Checkers/GCDAntipatternChecker.cpp 100 forEachDescendant(
101 varDecl(hasDescendant(SemaphoreCreateM)).bind(SemaphoreBinding)),
102 forEachDescendant(binaryOperator(bindAssignmentToDecl(SemaphoreBinding),
109 auto ArgCallsSignalM = hasAnyArgument(stmt(hasDescendant(callExpr(
118 forEachDescendant(
124 auto SemaphoreWaitM = forEachDescendant(
142 forEachDescendant(
143 varDecl(hasDescendant(DispatchGroupCreateM)).bind(GroupBinding)),
144 forEachDescendant(binaryOperator(bindAssignmentToDecl(GroupBinding),
147 auto GroupEnterM = forEachDescendant(
155 auto ArgCallsSignalM = hasAnyArgument(stmt(hasDescendant(callExpr(
164 forEachDescendant(
170 auto GroupWaitM = forEachDescendant(
tools/clang/lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp 304 hasDescendant(AnotherSuspiciousNumberObjectExprM))),
306 hasDescendant(AnotherSuspiciousNumberObjectExprM)))))
311 has(expr(SuspiciousNumberObjectExprM))))
316 has(expr(SuspiciousNumberObjectExprM))));
320 has(expr(SuspiciousNumberObjectExprM))));
341 F.addMatcher(stmt(forEachDescendant(FinalM)), &CB);
tools/clang/lib/StaticAnalyzer/Checkers/OSObjectCStyleCast.cpp 78 auto Matches = match(stmt(forEachDescendant(CastM)), *D->getBody(), AM.getASTContext());
tools/clang/lib/StaticAnalyzer/Checkers/ObjCAutoreleaseWriteChecker.cpp 180 forEachDescendant(
194 forEachDescendant(BlockPassedToMarkedFuncM));
tools/clang/lib/StaticAnalyzer/Checkers/PointerIterationChecker.cpp 79 return decl(forEachDescendant(PointerIterM));
tools/clang/lib/StaticAnalyzer/Checkers/PointerSortingChecker.cpp 83 hasType(cxxRecordDecl(has(
92 return decl(forEachDescendant(PointerSortM));
tools/clang/lib/StaticAnalyzer/Checkers/RunLoopAutoreleaseLeakChecker.cpp 159 hasAncestor(autoreleasePoolStmt().bind(OtherStmtAutoreleasePoolBind)));
163 hasDescendant(RunLoopRunM),
164 hasDescendant(OtherMessageSentM)).bind(AutoreleasePoolBind);
166 DeclarationMatcher GroupM = decl(hasDescendant(RunLoopInAutorelease));
177 auto NoPoolM = unless(hasAncestor(autoreleasePoolStmt()));
184 hasDescendant(RunLoopRunM),
185 hasDescendant(OtherMessageSentM)
tools/clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp 565 auto Accesses = match(stmt(hasDescendant(FieldAccessM)), *MethodBody, AC);
571 auto Guards = match(stmt(hasDescendant(GuardM)), *MethodBody, AC);
tools/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp 446 StatementMatcher ParentM = stmt(hasDescendant(WriteIntoIvarM));
tools/clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp 113 return declStmt(hasDescendant(varDecl(
116 initListExpr(has(declRefExpr(to(varDecl(VarNodeMatcher))))),
128 return hasDescendant(stmt(
tools/clang/lib/StaticAnalyzer/Core/LoopWidening.cpp 70 auto Matches = match(findAll(stmt(hasDescendant(varDecl(hasType(referenceType())).bind(MatchRef)))),
tools/clang/lib/StaticAnalyzer/Core/RegionStore.cpp 1092 StatementMatcher RefToStatic = stmt(hasDescendant(declRefExpr(
tools/clang/tools/extra/clang-change-namespace/ChangeNamespace.cpp 388 allOf(hasAncestor(namespaceDecl(hasName(FullOldNs)).bind("ns_decl")),
391 IsInMovedNs, unless(hasAncestor(namespaceDecl(hasName(Prefix)))));
417 IsInMovedNs, hasParent(namespaceDecl()))
423 classTemplateDecl(unless(hasDescendant(cxxRecordDecl(isDefinition()))),
424 IsInMovedNs, hasParent(namespaceDecl()))
432 hasAncestor(namespaceDecl()),
434 isImplicit(), hasAncestor(namespaceDecl(isAnonymous())),
435 hasAncestor(cxxRecordDecl()),
442 usingDecl(hasAnyUsingShadowDecl(decl()), hasParent(cxxRecordDecl()));
451 unless(anyOf(hasParent(typeLoc(loc(qualType(
454 hasParent(nestedNameSpecifierLoc()),
455 hasAncestor(isImplicit()),
456 hasAncestor(UsingShadowDeclInClass),
457 hasAncestor(functionDecl(isDefaulted())))),
458 hasAncestor(decl().bind("dc")))
476 hasAncestor(decl(IsInMovedNs).bind("dc")),
479 unless(anyOf(hasAncestor(isImplicit()),
480 hasAncestor(UsingShadowDeclInClass),
481 hasAncestor(functionDecl(isDefaulted())),
482 hasAncestor(typeLoc(loc(qualType(hasDeclaration(
504 hasAncestor(namespaceDecl(isAnonymous())),
505 hasAncestor(cxxRecordDecl()))),
506 hasParent(namespaceDecl()));
507 Finder->addMatcher(expr(hasAncestor(decl().bind("dc")), IsInMovedNs,
508 unless(hasAncestor(isImplicit())),
515 hasGlobalStorage(), hasParent(namespaceDecl()),
516 unless(anyOf(IsInMovedNs, hasAncestor(namespaceDecl(isAnonymous())))));
517 Finder->addMatcher(declRefExpr(IsInMovedNs, hasAncestor(decl().bind("dc")),
523 auto UnscopedEnumMatcher = enumConstantDecl(hasParent(enumDecl(
524 hasParent(namespaceDecl()),
525 unless(anyOf(isScoped(), IsInMovedNs, hasAncestor(cxxRecordDecl()),
526 hasAncestor(namespaceDecl(isAnonymous())))))));
528 declRefExpr(IsInMovedNs, hasAncestor(decl().bind("dc")),
tools/clang/tools/extra/clang-include-fixer/find-all-symbols/FindAllSymbols.cpp 118 auto IsInSpecialization = hasAncestor(
167 auto Functions = functionDecl(CommonFilter, unless(hasParent(friendDecl())),
211 to(functionDecl(hasParent(
212 functionTemplateDecl(has(Functions.bind("use"))))))),
233 classTemplateDecl(has(CXXRecords.bind("use"))))))))),
tools/clang/tools/extra/clang-move/Move.cpp 505 classTemplateDecl(unless(has(cxxRecordDecl(isDefinition()))));
525 hasParent(decl(anyOf(namespaceDecl(), translationUnitDecl()))),
541 hasParent(decl(anyOf(namespaceDecl(), translationUnitDecl()))), InOldCC);
571 auto InAnonymousNS = hasParent(namespaceDecl(isAnonymous()));
600 declRefExpr(to(HelperFuncOrVar), hasAncestor(decl().bind("dc")))
606 hasAncestor(decl().bind("dc"))),
tools/clang/tools/extra/clang-tidy/abseil/DurationDivisionCheck.cpp 33 unless(hasParent(cxxStaticCastExpr())),
34 unless(hasParent(cStyleCastExpr())),
tools/clang/tools/extra/clang-tidy/abseil/FasterStrsplitDelimiterCheck.cpp 76 expr(has(ignoringElidableConstructorCall(
77 ignoringParenCasts(cxxBindTemporaryExpr(has(cxxConstructExpr(
tools/clang/tools/extra/clang-tidy/abseil/NoInternalDependenciesCheck.cpp 30 hasParent(namespaceDecl(hasName("absl")))))),
tools/clang/tools/extra/clang-tidy/abseil/RedundantStrcatCallsCheck.cpp 39 callExpr(CallToStrcat, unless(hasAncestor(CallToEither))).bind("StrCat"),
68 has(callExpr(callee(functionDecl(*Strcat))).bind("StrCat")));
tools/clang/tools/extra/clang-tidy/abseil/StrCatAppendCheck.cpp 56 callExpr(hasAnyArgument(expr(hasDescendant(declRefExpr(
tools/clang/tools/extra/clang-tidy/abseil/TimeSubtractionCheck.cpp 39 callExpr(hasParent(materializeTemporaryExpr(hasParent(
39 callExpr(hasParent(materializeTemporaryExpr(hasParent(
40 cxxConstructExpr(hasParent(exprWithCleanups(
41 hasParent(varDecl()))))))))
43 callExpr(hasParent(varDecl())).bind("e"))),
55 expr(hasParent(materializeTemporaryExpr(
56 hasParent(cxxConstructExpr(
57 hasParent(callExpr()),
58 unless(hasParent(cxxOperatorCallExpr())))))))
60 expr(hasParent(callExpr()),
61 unless(hasParent(cxxOperatorCallExpr())))
72 expr(hasParent(materializeTemporaryExpr(hasParent(
72 expr(hasParent(materializeTemporaryExpr(hasParent(
73 cxxConstructExpr(hasParent(exprWithCleanups(
74 hasParent(returnStmt()))))))))
76 expr(hasParent(returnStmt())).bind("e"))),
162 "arg", match(expr(hasAncestor(
tools/clang/tools/extra/clang-tidy/abseil/UpgradeDurationConversionsCheck.cpp 41 hasParent(functionTemplateDecl()),
53 hasParent(functionTemplateDecl()),
65 hasParent(functionTemplateDecl()),
79 hasParent(functionTemplateDecl()),
107 has(implicitCastExpr(hasCastKind(CK_UserDefinedConversion)))),
108 hasParent(callExpr(
110 unless(hasParent(functionTemplateDecl())))),
143 hasAncestor(decl(anyOf(classTemplateDecl(), functionTemplateDecl())));
tools/clang/tools/extra/clang-tidy/boost/UseToStringCheck.cpp 36 hasParameter(0, hasType(qualType(has(substTemplateTypeParmType(
tools/clang/tools/extra/clang-tidy/bugprone/AssertSideEffectCheck.cpp 87 hasDescendant(expr(hasSideEffect(CheckFunctionCalls)));
tools/clang/tools/extra/clang-tidy/bugprone/BoolPointerImplicitConversionCheck.cpp 22 unless(hasParent(unaryOperator(hasOperatorName("!")))),
60 !match(findAll(cxxDeleteExpr(has(ignoringParenImpCasts(expr(DeclRef))))),
tools/clang/tools/extra/clang-tidy/bugprone/BranchCloneCheck.cpp 63 hasParent(stmt(unless(ifStmt(hasElse(equalsBoundNode("if")))))),
tools/clang/tools/extra/clang-tidy/bugprone/DanglingHandleCheck.cpp 114 exprWithCleanups(has(ignoringParenImpCasts(ConvertedHandle)))
124 hasInitializer(exprWithCleanups(has(ignoringParenImpCasts(handleFrom(
148 has(ignoringImplicit(handleFrom(
160 unless(hasAncestor(lambdaExpr())))
166 returnStmt(has(exprWithCleanups(has(ignoringParenImpCasts(handleFrom(
166 returnStmt(has(exprWithCleanups(has(ignoringParenImpCasts(handleFrom(
tools/clang/tools/extra/clang-tidy/bugprone/FoldInitTypeCheck.cpp 30 recordType(hasDeclaration(has(typedefNameDecl(
tools/clang/tools/extra/clang-tidy/bugprone/ForwardDeclarationNamespaceCheck.cpp 30 auto IsInSpecialization = hasAncestor(
35 hasParent(decl(anyOf(namespaceDecl(), translationUnitDecl()))),
36 unless(isImplicit()), unless(hasAncestor(cxxRecordDecl())),
tools/clang/tools/extra/clang-tidy/bugprone/ForwardingReferenceOverloadCheck.cpp 81 unless(hasParent(functionTemplateDecl(has(templateTypeParmDecl(
81 unless(hasParent(functionTemplateDecl(has(templateTypeParmDecl(
tools/clang/tools/extra/clang-tidy/bugprone/InaccurateEraseCheck.cpp 31 anyOf(cxxConstructExpr(has(ignoringImplicit(
43 hasArgument(0, has(ignoringImplicit(
44 anyOf(EndCall, has(ignoringImplicit(EndCall)))))),
tools/clang/tools/extra/clang-tidy/bugprone/IncorrectRoundingsCheck.cpp 44 implicitCastExpr(FloatType, has(ignoringParenImpCasts(FloatHalf))));
tools/clang/tools/extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp 159 unless(hasBody(hasDescendant(
tools/clang/tools/extra/clang-tidy/bugprone/IntegerDivisionCheck.cpp 39 hasAncestor(
41 unless(hasAncestor(
43 hasAncestor(castExpr(equalsBoundNode("FloatCast")))))))
tools/clang/tools/extra/clang-tidy/bugprone/LambdaFunctionNameCheck.cpp 63 Finder->addMatcher(predefinedExpr(hasAncestor(lambdaExpr())).bind("E"),
tools/clang/tools/extra/clang-tidy/bugprone/MisplacedOperatorInStrlenInAllocCheck.cpp 41 hasDescendant(BadUse)),
tools/clang/tools/extra/clang-tidy/bugprone/MisplacedWideningCastCheck.cpp 40 has(ignoringParenImpCasts(Calc)));
43 has(ignoringParenImpCasts(Calc)));
tools/clang/tools/extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp 532 hasAncestor(compoundStmt(hasDescendant(binaryOperator(
532 hasAncestor(compoundStmt(hasDescendant(binaryOperator(
552 auto HasIncOp = anyOf(ignoringImpCasts(IncOp), hasDescendant(IncOp));
553 auto HasDecOp = anyOf(ignoringImpCasts(DecOp), hasDescendant(DecOp));
555 auto Container = ignoringImpCasts(cxxMemberCallExpr(hasDescendant(declRefExpr(
586 has(memberExpr(member(hasAnyName("size", "length"))))))
590 auto SizeOfCharExpr = unaryExprOrTypeTraitExpr(has(expr(AnyOfCharTy)));
593 ignoringImpCasts(anyOf(Strlen, SizeOrLength, hasDescendant(Strlen),
594 hasDescendant(SizeOrLength)));
604 hasBody(has(returnStmt(hasReturnValue(AnyOfCallOrDREWithoutInc))))))));
629 hasDescendant(callExpr(MallocLengthExpr)));
650 hasDescendant(DestArrayTyDecl))),
652 anyOf(DestUnknownDecl, hasDescendant(DestUnknownDecl))));
655 hasLHS(anyOf(hasDescendant(declRefExpr(
657 hasDescendant(declRefExpr(equalsBoundNode(DestExprName))))),
663 anyOf(hasAncestor(cxxMemberCallExpr().bind(SrcExprName)),
668 hasDescendant(stringLiteral().bind(SrcExprName)),
669 SrcDecl, hasDescendant(SrcDecl)));
692 unless(hasAncestor(compoundStmt(
693 hasDescendant(NullTerminatorExpr)))),
780 unless(hasAncestor(castExpr(unless(implicitCastExpr())))))
785 has(callExpr(Memchr).bind(FunctionExprName))))
tools/clang/tools/extra/clang-tidy/bugprone/ParentVirtualCallCheck.cpp 87 callee(memberExpr(hasDescendant(implicitCastExpr(
tools/clang/tools/extra/clang-tidy/bugprone/SizeofContainerCheck.cpp 22 expr(sizeOfExpr(has(ignoringParenImpCasts(
30 unless(hasAncestor(binaryOperator(
tools/clang/tools/extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp 89 has(hasUnqualifiedDesugaredType(type().bind("sizeof-arg-type")))),
90 sizeOfExpr(has(expr(hasType(
93 sizeOfExpr(has(ignoringParenImpCasts(expr(integerLiteral(equals(0)))))));
100 expr(sizeOfExpr(has(ignoringParenImpCasts(ConstantExpr))),
109 expr(sizeOfExpr(ignoringParenImpCasts(has(IntegerCallExpr))))
117 expr(sizeOfExpr(has(ignoringParenImpCasts(expr(cxxThisExpr())))))
127 Finder->addMatcher(expr(sizeOfExpr(has(ignoringParenImpCasts(expr(
155 expr(anyOf(sizeOfExpr(has(expr(ignoringParenImpCasts(
158 sizeOfExpr(has(PointerToStructType))))
175 Finder->addMatcher(expr(sizeOfExpr(has(expr(ignoringParenImpCasts(
191 anyOf(sizeOfExpr(has(NumType)),
192 sizeOfExpr(has(expr(hasType(NumType)))))))),
194 anyOf(sizeOfExpr(has(DenomType)),
195 sizeOfExpr(has(expr(hasType(DenomType)))))))))
218 expr(sizeOfExpr(has(ignoringParenImpCasts(expr(
tools/clang/tools/extra/clang-tidy/bugprone/SuspiciousMissingCommaCheck.cpp 90 has(ignoringParenImpCasts(expr(ConcatenatedStringLiteral))));
tools/clang/tools/extra/clang-tidy/bugprone/SuspiciousStringCompareCheck.cpp 158 has(ignoringParenImpCasts(integerLiteral(unless(equals(0)))))),
tools/clang/tools/extra/clang-tidy/bugprone/TerminatingContinueCheck.cpp 29 continueStmt(hasAncestor(stmt(anyOf(forStmt(), whileStmt(),
32 hasAncestor(doWithFalse))
tools/clang/tools/extra/clang-tidy/bugprone/ThrowKeywordMissingCheck.cpp 31 unless(anyOf(hasAncestor(stmt(
33 hasAncestor(varDecl()),
34 allOf(hasAncestor(CtorInitializerList),
35 unless(hasAncestor(cxxCatchStmt()))))))
tools/clang/tools/extra/clang-tidy/bugprone/TooSmallLoopVariableCheck.cpp 63 has(ignoringParenImpCasts(LoopVarMatcher)))
tools/clang/tools/extra/clang-tidy/bugprone/UndelegatedConstructorCheck.cpp 64 hasParent(
66 forEach(ignoringTemporaryExpr(
tools/clang/tools/extra/clang-tidy/bugprone/UnhandledSelfAssignmentCheck.cpp 46 const auto HasNoSelfCheck = cxxMethodDecl(unless(hasDescendant(
48 has(ignoringParenCasts(cxxThisExpr()))))));
54 ofClass(cxxRecordDecl(unless(hasAncestor(classTemplateDecl())))),
55 hasDescendant(cxxConstructExpr(hasDeclaration(cxxConstructorDecl(
62 ofClass(cxxRecordDecl(hasAncestor(classTemplateDecl()))),
63 anyOf(hasDescendant(
65 hasDescendant(parenListExpr()))),
66 hasDescendant(cxxUnresolvedConstructExpr(hasDescendant(declRefExpr(
66 hasDescendant(cxxUnresolvedConstructExpr(hasDescendant(declRefExpr(
73 cxxMethodDecl(unless(hasDescendant(cxxMemberCallExpr(callee(cxxMethodDecl(
90 has(fieldDecl(anyOf(hasType(pointerType()), hasType(SmartPointerType),
tools/clang/tools/extra/clang-tidy/bugprone/UnusedRaiiCheck.cpp 36 cxxBindTemporaryExpr(unless(has(ignoringParenImpCasts(callExpr()))))
40 hasParent(compoundStmt().bind("compound")),
42 anyOf(has(ignoringParenImpCasts(BindTemp)),
43 has(ignoringParenImpCasts(cxxFunctionalCastExpr(
44 has(ignoringParenImpCasts(BindTemp)))))))
83 match(expr(hasDescendant(typeLoc().bind("t"))), *E, *Result.Context);
tools/clang/tools/extra/clang-tidy/bugprone/UnusedReturnValueCheck.cpp 63 compoundStmt(forEach(MatchedCallExpr),
68 unless(hasParent(stmtExpr())));
77 auto UnusedInCaseStmt = switchCase(forEach(MatchedCallExpr));
tools/clang/tools/extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp 78 return anyOf(hasAncestor(typeLoc()),
79 hasAncestor(declRefExpr(
297 declStmt(hasDescendant(equalsNode(MovedVariable))),
383 anyOf(hasAncestor(lambdaExpr().bind("containing-lambda")),
384 hasAncestor(functionDecl().bind("containing-func"))),
392 stmt(forEach(expr(ignoringParenImpCasts(CallMoveMatcher))),
tools/clang/tools/extra/clang-tidy/cert/DontModifyStdNamespaceCheck.cpp 26 has(decl(unless(anyOf(
tools/clang/tools/extra/clang-tidy/cert/ProperlySeededRandomGeneratorCheck.cpp 51 has(memberExpr(has(declRefExpr(RandomGeneratorEngineTypeMatcher)),
51 has(memberExpr(has(declRefExpr(RandomGeneratorEngineTypeMatcher)),
53 unless(hasDescendant(cxxThisExpr())))))
tools/clang/tools/extra/clang-tidy/cert/StaticObjectExceptionCheck.cpp 29 hasAncestor(functionDecl()))),
30 anyOf(hasDescendant(cxxConstructExpr(hasDeclaration(
32 hasDescendant(cxxNewExpr(hasDeclaration(
34 hasDescendant(callExpr(hasDeclaration(
tools/clang/tools/extra/clang-tidy/cert/ThrownExceptionTypeCheck.cpp 25 cxxThrowExpr(has(ignoringParenImpCasts(
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/AvoidGotoCheck.cpp 37 stmt(anyOf(forStmt(hasAncestor(Loop)), cxxForRangeStmt(hasAncestor(Loop)),
37 stmt(anyOf(forStmt(hasAncestor(Loop)), cxxForRangeStmt(hasAncestor(Loop)),
38 whileStmt(hasAncestor(Loop)), doStmt(hasAncestor(Loop))));
38 whileStmt(hasAncestor(Loop)), doStmt(hasAncestor(Loop))));
40 Finder->addMatcher(gotoStmt(anyOf(unless(hasAncestor(NestedLoop)),
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/InterfacesGlobalInitCheck.cpp 32 hasInitializer(expr(hasDescendant(ReferencesUndefinedGlobalVar))))
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp 45 unless(hasParent(castExpr())),
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/OwningMemoryCheck.cpp 76 hasDescendant(
110 has(cxxConstructorDecl(forEachConstructorInitializer(
160 functionDecl(hasDescendant(returnStmt(hasReturnValue(ConsideredOwner))
170 has(fieldDecl(IsOwnerType).bind("undestructed_owner_member")),
171 anyOf(unless(has(cxxDestructorDecl())),
172 has(cxxDestructorDecl(anyOf(isDefaulted(), isDeleted())))))
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.cpp 29 return stmt(hasAncestor(cxxForRangeStmt(
30 hasRangeBeginEndStmt(hasDescendant(equalsNode(&Node))))))
61 unless(hasParent(arraySubscriptExpr())),
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp 52 hasIndex(expr().bind("index")), unless(hasAncestor(isImplicit())))
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp 265 hasParent(cxxRecordDecl(unless(isTriviallyDefaultConstructible()))));
278 anyOf(has(cxxConstructorDecl(isDefaultConstructor(), isDefaulted(),
280 unless(has(cxxConstructorDecl()))),
292 hasType(recordDecl(has(fieldDecl()),
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/SlicingCheck.cpp 46 hasParent(cxxConstructorDecl(ofClass(equalsBoundNode("DerivedDecl"))));
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp 42 has(cxxDestructorDecl(unless(isImplicit())).bind("dtor")),
43 has(cxxConstructorDecl(isCopyConstructor(), unless(isImplicit()))
45 has(cxxMethodDecl(isCopyAssignmentOperator(),
48 has(cxxConstructorDecl(isMoveConstructor(), unless(isImplicit()))
50 has(cxxMethodDecl(isMoveAssignmentOperator(),
tools/clang/tools/extra/clang-tidy/fuchsia/StaticallyConstructedObjectsCheck.cpp 40 hasDescendant(cxxConstructExpr(unless(allOf(
tools/clang/tools/extra/clang-tidy/fuchsia/TrailingReturnCheck.cpp 38 hasParent(cxxRecordDecl(isLambda())))))
tools/clang/tools/extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp 29 unless(hasParent(substNonTypeTemplateParmExpr())),
110 if (!match(expr(hasAncestor(linkageSpecDecl())), *CastExpr, *Result.Context)
tools/clang/tools/extra/clang-tidy/google/FunctionNamingCheck.cpp 105 hasAncestor(namespaceDecl()), isMain(), isImplicit(),
tools/clang/tools/extra/clang-tidy/google/IntegerTypesCheck.cpp 67 unless(hasAncestor(callExpr(
tools/clang/tools/extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp 196 unless(hasAncestor(decl(isImplicit()))), LocationFilter)
237 hasAncestor(decl(anyOf(classTemplateDecl(), functionTemplateDecl())));
tools/clang/tools/extra/clang-tidy/hicpp/ExceptionBaseclassCheck.cpp 25 unless(has(expr(anyOf(isTypeDependent(), isValueDependent())))),
27 has(expr(unless(
32 anyOf(has(expr(
39 eachOf(has(expr(hasType(namedDecl().bind("decl")))), anything()))
tools/clang/tools/extra/clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp 45 Finder->addMatcher(ifStmt(hasParent(ifStmt()), unless(hasElse(anything())))
tools/clang/tools/extra/clang-tidy/linuxkernel/MustCheckErrsCheck.cpp 25 callExpr(callee(ErrFn), hasParent(NonCheckingStmts)).bind("call"),
29 auto ReturnsErrFn = functionDecl(hasDescendant(ReturnToCheck));
30 Finder->addMatcher(callExpr(callee(ReturnsErrFn), hasParent(NonCheckingStmts))
tools/clang/tools/extra/clang-tidy/llvm/PreferIsaOrDynCastInConditionalsCheck.cpp 29 auto Condition = hasCondition(implicitCastExpr(has(
37 has(declStmt(containsDeclaration(
64 hasRHS(anyOf(implicitCastExpr(has(CallExpression)),
tools/clang/tools/extra/clang-tidy/llvm/PreferRegisterOverUnsignedCheck.cpp 26 varDecl(hasInitializer(exprWithCleanups(has(implicitCastExpr(has(
26 varDecl(hasInitializer(exprWithCleanups(has(implicitCastExpr(has(
28 has(memberExpr(hasDeclaration(
tools/clang/tools/extra/clang-tidy/misc/NonPrivateMemberVariablesInClassesCheck.cpp 31 return cxxRecordDecl(has(fieldDecl(unless(isPublic()))))
75 forEach(InterestingField.bind("field")))
tools/clang/tools/extra/clang-tidy/misc/RedundantExpressionCheck.cpp 660 unless(hasDescendant(BannedIntegerLiteral)))
694 has(unaryOperator(
tools/clang/tools/extra/clang-tidy/misc/StaticAssertCheck.cpp 42 IsAlwaysFalse, cStyleCastExpr(has(ignoringParenImpCasts(IsAlwaysFalse)))
tools/clang/tools/extra/clang-tidy/misc/UnconventionalAssignOperatorCheck.cpp 59 const auto IsBadReturnStatement = returnStmt(unless(has(ignoringParenImpCasts(
tools/clang/tools/extra/clang-tidy/misc/UniqueptrResetReleaseCheck.cpp 32 has(ignoringParenImpCasts(cxxMemberCallExpr(
tools/clang/tools/extra/clang-tidy/modernize/AvoidCArraysCheck.cpp 52 unless(anyOf(hasParent(parmVarDecl(isArgvOfMain())),
53 hasParent(varDecl(isExternC())),
54 hasParent(fieldDecl(
55 hasParent(recordDecl(isExternCContext())))),
56 hasAncestor(functionDecl(isExternC())))))
tools/clang/tools/extra/clang-tidy/modernize/LoopConvertCheck.cpp 138 hasDescendant(BeginCallMatcher))))
tools/clang/tools/extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp 84 auto CanCallCtor = unless(has(ignoringImpCasts(
88 cxxBindTemporaryExpr(has(ignoringParenImpCasts(
tools/clang/tools/extra/clang-tidy/modernize/PassByValueCheck.cpp 148 has(ignoringParenImpCasts(declRefExpr(to(
tools/clang/tools/extra/clang-tidy/modernize/RawStringLiteralCheck.cpp 126 stringLiteral(unless(hasParent(predefinedExpr()))).bind("lit"), this);
tools/clang/tools/extra/clang-tidy/modernize/ReplaceRandomShuffleCheck.cpp 40 has(implicitCastExpr(has(declRefExpr().bind("name")))))
40 has(implicitCastExpr(has(declRefExpr().bind("name")))))
tools/clang/tools/extra/clang-tidy/modernize/ReturnBracedInitListCheck.cpp 30 isListInitialization(), hasDescendant(initListExpr()),
35 has(ConstructExpr), has(cxxFunctionalCastExpr(has(ConstructExpr)))));
35 has(ConstructExpr), has(cxxFunctionalCastExpr(has(ConstructExpr)))));
35 has(ConstructExpr), has(cxxFunctionalCastExpr(has(ConstructExpr)))));
40 hasDescendant(returnStmt(hasReturnValue(
41 has(cxxConstructExpr(has(CtorAsArgument)))))))
41 has(cxxConstructExpr(has(CtorAsArgument)))))))
tools/clang/tools/extra/clang-tidy/modernize/ShrinkToFitCheck.cpp 33 unaryOperator(has(ignoringParenImpCasts(ShrinkableAsMember))),
34 unaryOperator(has(ignoringParenImpCasts(ShrinkableAsDecl))))));
38 unaryOperator(has(ignoringParenImpCasts(
40 unaryOperator(has(ignoringParenImpCasts(declRefExpr(
48 has(ignoringParenImpCasts(memberExpr(hasDescendant(CopyCtorCall)))),
48 has(ignoringParenImpCasts(memberExpr(hasDescendant(CopyCtorCall)))),
tools/clang/tools/extra/clang-tidy/modernize/UseAutoCheck.cpp 249 return declStmt(unless(has(
259 unless(has(varDecl(anyOf(
277 unless(has(varDecl(unless(hasInitializer(explicitCastExpr()))))))
286 anyOf(has(memberExpr(hasExplicitTemplateArgs())),
287 has(ignoringImpCasts(declRefExpr(hasExplicitTemplateArgs()))));
297 return declStmt(unless(has(varDecl(
307 has(varDecl(unless(isImplicit()))),
309 unless(has(varDecl(anyOf(hasType(autoType()),
310 hasType(qualType(hasDescendant(autoType()))))))),
tools/clang/tools/extra/clang-tidy/modernize/UseBoolLiteralsCheck.cpp 31 has(ignoringParenImpCasts(integerLiteral().bind("literal"))),
34 anyOf(hasParent(explicitCastExpr().bind("cast")), anything())),
39 hasParent(implicitCastExpr(
tools/clang/tools/extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp 215 hasParent(recordDecl(isUnion()))))),
tools/clang/tools/extra/clang-tidy/modernize/UseEmplaceCheck.cpp 78 hasParent(implicitCastExpr(hasCastKind(CastKind::CK_DerivedToBase)));
83 auto HasInitList = anyOf(has(ignoringImplicit(initListExpr())),
84 has(cxxStdInitializerListExpr()));
94 auto HasConstructExpr = has(ignoringImplicit(SoughtConstructExpr));
107 has(materializeTemporaryExpr(MakeTuple)),
112 anyOf(has(MakeTuple), has(MakeTupleCtor),
112 anyOf(has(MakeTuple), has(MakeTupleCtor),
113 HasConstructExpr, has(cxxFunctionalCastExpr(HasConstructExpr))));
115 Finder->addMatcher(cxxMemberCallExpr(CallPushBack, has(SoughtParam),
tools/clang/tools/extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp 99 initListExpr(has(AccessToFieldInParam)),
132 match(returnStmt(has(ignoringParenImpCasts(unaryOperator(
148 compoundStmt(has(ignoringParenImpCasts(cxxMemberCallExpr(
176 compoundStmt(has(ignoringParenImpCasts(stmt(anyOf(
tools/clang/tools/extra/clang-tidy/modernize/UseEqualsDeleteCheck.cpp 46 hasParent(cxxRecordDecl(hasMethod(unless(
tools/clang/tools/extra/clang-tidy/modernize/UseNullptrCheck.cpp 45 explicitCastExpr(hasDescendant(ImplicitCastToNull))),
46 unless(hasAncestor(explicitCastExpr())))
tools/clang/tools/extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp 381 Finder->addMatcher(friendDecl(hasDescendant(F)).bind("Friend"), this);
tools/clang/tools/extra/clang-tidy/modernize/UseUncaughtExceptionsCheck.cpp 39 unless(hasAncestor(initListExpr())))
44 Finder->addMatcher(callExpr(hasAncestor(initListExpr()),
tools/clang/tools/extra/clang-tidy/objc/SuperSelfCheck.cpp 84 hasAncestor(objcMethodDecl(
tools/clang/tools/extra/clang-tidy/performance/FasterStringFindCheck.cpp 45 hasDescendant(substTemplateTypeParmType()))));
tools/clang/tools/extra/clang-tidy/performance/ForRangeCopyCheck.cpp 44 unless(hasInitializer(expr(hasDescendant(materializeTemporaryExpr())))));
tools/clang/tools/extra/clang-tidy/performance/ImplicitConversionInLoopCheck.cpp 54 expr(anyOf(hasDescendant(
56 hasDescendant(unaryOperator(hasOperatorName("*"))
tools/clang/tools/extra/clang-tidy/performance/InefficientAlgorithmCheck.cpp 47 0, cxxConstructExpr(has(ignoringParenImpCasts(cxxMemberCallExpr(
56 1, cxxConstructExpr(has(ignoringParenImpCasts(cxxMemberCallExpr(
tools/clang/tools/extra/clang-tidy/performance/InefficientStringConcatenationCheck.cpp 46 hasDescendant(BasicStringPlusOperator))
54 hasArgument(1, stmt(hasDescendant(declRefExpr(
56 hasDescendant(BasicStringPlusOperator));
64 hasAncestor(stmt(anyOf(cxxForRangeStmt(),
tools/clang/tools/extra/clang-tidy/performance/InefficientVectorOperationCheck.cpp 115 anyOf(compoundStmt(statementCountIs(1), has(AppendCall)), AppendCall));
117 hasParent(compoundStmt(has(TargetVarDefStmt)).bind(LoopParentName));
117 hasParent(compoundStmt(has(TargetVarDefStmt)).bind(LoopParentName));
131 hasRHS(expr(unless(hasDescendant(expr(RefersToLoopVar))))
tools/clang/tools/extra/clang-tidy/performance/UnnecessaryCopyInitialization.cpp 57 forEachDescendant(
59 has(varDecl(hasLocalStorage(),
tools/clang/tools/extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp 37 unless(hasAncestor(callExpr()))),
45 match(decl(forEachDescendant(declRefExpr(
47 unless(hasAncestor(stmt(anyOf(forStmt(), cxxForRangeStmt(),
90 has(typeLoc(forEach(ExpensiveValueParamDecl))),
90 has(typeLoc(forEach(ExpensiveValueParamDecl))),
tools/clang/tools/extra/clang-tidy/readability/AvoidConstParamsInDecls.cpp 44 has(typeLoc(forEach(ConstParamDecl))))
44 has(typeLoc(forEach(ConstParamDecl))))
tools/clang/tools/extra/clang-tidy/readability/ContainerSizeEmptyCheck.cpp 37 has(cxxMethodDecl(
42 has(cxxMethodDecl(isConst(), parameterCountIs(0), isPublic(),
48 hasParent(binaryOperator(
53 hasParent(implicitCastExpr(
56 hasParent(unaryOperator(hasOperatorName("!")).bind("NegOnSize")),
58 hasParent(explicitCastExpr(hasDestinationType(booleanType()))));
65 unless(hasAncestor(cxxMethodDecl(
76 ignoringImpCasts(cxxBindTemporaryExpr(has(DefaultConstructor))),
80 has(expr(ignoringImpCasts(DefaultConstructor)))),
83 has(expr(ignoringImpCasts(DefaultConstructor)))));
97 unless(hasAncestor(
tools/clang/tools/extra/clang-tidy/readability/DeleteNullPointerCheck.cpp 23 cxxDeleteExpr(has(castExpr(has(declRefExpr(
23 cxxDeleteExpr(has(castExpr(has(declRefExpr(
28 cxxDeleteExpr(has(castExpr(has(memberExpr(hasDeclaration(
28 cxxDeleteExpr(has(castExpr(has(memberExpr(hasDeclaration(
46 compoundStmt(anyOf(has(DeleteExpr), has(DeleteMemberExpr)),
46 compoundStmt(anyOf(has(DeleteExpr), has(DeleteMemberExpr)),
tools/clang/tools/extra/clang-tidy/readability/ElseAfterReturnCheck.cpp 26 compoundStmt(forEach(
36 compoundStmt(has(InterruptsControlFlow))))),
tools/clang/tools/extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp 268 has(ignoringImplicit(memberExpr(hasDeclaration(fieldDecl(hasBitWidth(1)))))),
269 hasParent(explicitCastExpr())));
291 hasParent(stmt(anyOf(ifStmt(), whileStmt()), has(declStmt())))),
291 hasParent(stmt(anyOf(ifStmt(), whileStmt()), has(declStmt())))),
293 unless(exceptionCases), unless(has(boolXor)),
296 anyOf(hasParent(stmt().bind("parentStmt")), anything()),
298 unless(hasAncestor(functionTemplateDecl())))
310 auto bitfieldConstruct = cxxConstructorDecl(hasDescendant(cxxCtorInitializer(
320 unless(hasParent(binaryOperator(anyOf(
323 unless(hasParent(bitfieldConstruct)),
325 anyOf(hasParent(implicitCastExpr().bind("furtherImplicitCast")),
328 unless(hasAncestor(functionTemplateDecl()))),
tools/clang/tools/extra/clang-tidy/readability/IsolateDeclarationCheck.cpp 29 hasParent(compoundStmt()))
tools/clang/tools/extra/clang-tidy/readability/MisleadingIndentationCheck.cpp 111 compoundStmt(has(stmt(anyOf(ifStmt(), forStmt(), whileStmt()))))
tools/clang/tools/extra/clang-tidy/readability/RedundantControlFlowCheck.cpp 37 has(compoundStmt(hasAnySubstatement(returnStmt(unless(has(expr())))))
37 has(compoundStmt(hasAnySubstatement(returnStmt(unless(has(expr())))))
41 has(compoundStmt(hasAnySubstatement(continueStmt())).bind("continue"));
tools/clang/tools/extra/clang-tidy/readability/RedundantDeclarationCheck.cpp 35 hasParent(friendDecl()))))))
tools/clang/tools/extra/clang-tidy/readability/RedundantFunctionPtrDereferenceCheck.cpp 21 has(implicitCastExpr(
tools/clang/tools/extra/clang-tidy/readability/RedundantMemberInitCheck.cpp 29 hasDeclaration(cxxConstructorDecl(hasParent(
42 unless(forField(hasParent(recordDecl(isUnion())))))
tools/clang/tools/extra/clang-tidy/readability/RedundantSmartptrGetCheck.cpp 41 has(cxxMethodDecl(hasName("operator->"),
43 has(cxxMethodDecl(hasName("operator*"), returns(qualType(references(
62 recordDecl(Smartptr, has(cxxConversionDecl(returns(booleanType()))))));
tools/clang/tools/extra/clang-tidy/readability/SimplifyBooleanExprCheck.cpp 69 returnStmt(has(cxxBoolLiteral(equals(Value)).bind(Id)))
72 compoundStmt(statementCountIs(1), has(SimpleReturnsBool)));
453 unless(hasParent(ifStmt())),
481 ifStmt(unless(hasParent(ifStmt())), hasThen(Then), hasElse(Else))
493 hasAnySubstatement(returnStmt(has(ignoringParenImpCasts(
tools/clang/tools/extra/clang-tidy/readability/SimplifySubscriptExprCheck.cpp 40 has(memberExpr().bind("member")),
43 hasDescendant(substTemplateTypeParmType()))),
tools/clang/tools/extra/clang-tidy/readability/StaticDefinitionInAnonymousNamespaceCheck.cpp 25 hasParent(namespaceDecl(isAnonymous())))
tools/clang/tools/extra/clang-tidy/readability/StringCompareCheck.cpp 38 has(StrCompare))
tools/clang/tools/extra/clang-tidy/readability/UniqueptrDeleteReleaseCheck.cpp 22 substTemplateTypeParmType(), hasDescendant(substTemplateTypeParmType())));
30 cxxDeleteExpr(has(ignoringParenImpCasts(cxxMemberCallExpr(
tools/clang/tools/extra/clang-tidy/readability/UppercaseLiteralSuffixCheck.cpp 202 unless(anyOf(hasParent(userDefinedLiteral()),
203 hasAncestor(isImplicit()),
204 hasAncestor(substNonTypeTemplateParmExpr())))),
tools/clang/tools/extra/clang-tidy/utils/ASTUtils.cpp 23 "function", match(stmt(hasAncestor(functionDecl().bind("function"))),
tools/clang/tools/extra/clang-tidy/utils/DeclRefExprUtils.cpp 85 match(decl(forEachDescendant(expr(
97 Matches = match(decl(forEachDescendant(callExpr(UsedAsConstRefOrValueArg))),
101 match(decl(forEachDescendant(cxxConstructExpr(UsedAsConstRefOrValueArg))),
132 decl(forEachDescendant(
146 decl(hasDescendant(
160 decl(hasDescendant(
tools/clang/tools/extra/clang-tidy/utils/NamespaceAliaser.cpp 47 match(functionDecl(hasBody(compoundStmt(has(declStmt(
48 has(namespaceAliasDecl(hasTargetNamespace(hasName(Namespace)))
62 !match(functionDecl(hasAncestor(decl(has(ConflictMatcher)))), *Function,
62 !match(functionDecl(hasAncestor(decl(has(ConflictMatcher)))), *Function,
tools/clang/tools/extra/clang-tidy/utils/UsingInserter.cpp 52 !match(stmt(hasAncestor(decl(has(usingDecl(hasAnyUsingShadowDecl(
52 !match(stmt(hasAncestor(decl(has(usingDecl(hasAnyUsingShadowDecl(
tools/clang/tools/extra/clang-tidy/zircon/TemporaryObjectsCheck.cpp 32 cxxTemporaryObjectExpr(hasDeclaration(cxxConstructorDecl(hasParent(
39 cxxConstructExpr(hasParent(cxxFunctionalCastExpr()),
41 hasParent(cxxRecordDecl(matchesAnyName(Names))))))
tools/clang/unittests/AST/ASTContextParentMapTest.cpp 30 cxxMethodDecl(hasParent(recordDecl(hasName("C"))))));
36 ifStmt(hasParent(compoundStmt()))));
43 typeLoc(hasParent(typeLoc(hasParent(functionDecl()))))));
43 typeLoc(hasParent(typeLoc(hasParent(functionDecl()))))));
49 nestedNameSpecifierLoc(hasParent(typeLoc()))));
58 hasParent(cxxRecordDecl(isTemplateInstantiation())))));
63 hasParent(cxxRecordDecl(unless(isTemplateInstantiation()))))));
69 allOf(hasParent(cxxRecordDecl(unless(isTemplateInstantiation()))),
70 hasParent(cxxRecordDecl(isTemplateInstantiation()))))));
79 hasAncestor(cxxRecordDecl(isTemplateInstantiation())),
80 hasAncestor(cxxRecordDecl(unless(isTemplateInstantiation())))))));
112 varDecl(hasName("y"), hasAncestor(functionDecl(
114 hasParent(cxxRecordDecl(
115 isImplicit(), hasParent(lambdaExpr())))))),
tools/clang/unittests/AST/ASTImporterTest.cpp 117 has(namedDecl(hasName(DeclToImportID)).bind(DeclToImportID))),
467 functionDecl(hasDescendant(
472 functionDecl(hasDescendant(
477 functionDecl(hasDescendant(
489 functionDecl(hasDescendant(chooseExpr())));
497 functionDecl(hasDescendant(gnuNullExpr(hasType(isInteger())))));
505 functionDecl(hasDescendant(cxxNullPtrLiteralExpr())));
514 functionDecl(hasDescendant(
519 functionDecl(hasDescendant(
528 functionDecl(hasDescendant(imaginaryLiteral())));
538 functionDecl(hasDescendant(
541 has(initListExpr(
543 has(integerLiteral(
545 has(integerLiteral(
547 has(integerLiteral(
558 hasDescendant(
569 functionDecl(hasDescendant(
571 has(ignoringParenImpCasts(
574 has(integerLiteral(equals(1), hasType(asString("int"))))))));
583 hasDescendant(
585 hasDescendant(
606 hasBody(compoundStmt(has(declStmt(hasSingleDecl(
607 varDecl(hasInitializer(parenListExpr(has(unaryOperator(
617 functionDecl(hasDescendant(
618 switchStmt(has(compoundStmt(has(caseStmt())))))));
618 switchStmt(has(compoundStmt(has(caseStmt())))))));
626 functionDecl(hasDescendant(
638 hasDescendant(
647 functionDecl(hasDescendant(
661 functionDecl(hasDescendant(
685 functionDecl(hasDescendant(
687 has(designatedInitExpr(
689 hasDescendant(floatLiteral(equals(1.0))),
690 hasDescendant(integerLiteral(equals(2))))),
691 has(designatedInitExpr(
693 hasDescendant(floatLiteral(equals(2.0))),
694 hasDescendant(integerLiteral(equals(2))))),
695 has(designatedInitExpr(
697 hasDescendant(floatLiteral(equals(1.0))),
698 hasDescendant(integerLiteral(equals(0)))))))));
707 functionDecl(hasDescendant(
711 has(stringLiteral(hasType(
723 functionDecl(hasDescendant(
725 has(
728 has(
731 has(floatLiteral(equals(1.0))),
732 has(implicitValueInitExpr(
734 has(
737 has(floatLiteral(equals(2.0))),
738 has(floatLiteral(equals(1.0)))))))));
750 functionDecl(hasDescendant(
760 functionDecl(hasDescendant(
761 exprWithCleanups(has(cxxConstructExpr(
762 has(materializeTemporaryExpr(has(implicitCastExpr(
762 has(materializeTemporaryExpr(has(implicitCastExpr(
763 has(cxxTemporaryObjectExpr())))))))))));
771 functionDecl(hasDescendant(typedefDecl(has(atomicType())))));
771 functionDecl(hasDescendant(typedefDecl(has(atomicType())))));
792 functionTemplateDecl(hasDescendant(
793 cStyleCastExpr(has(cxxDependentScopeMemberExpr())))));
802 functionTemplateDecl(hasDescendant(
803 cStyleCastExpr(has(cxxDependentScopeMemberExpr())))));
815 hasDescendant(implicitCastExpr(has(declRefExpr()))),
815 hasDescendant(implicitCastExpr(has(declRefExpr()))),
816 unless(hasAncestor(translationUnitDecl(has(typeAliasDecl()))))));
816 unless(hasAncestor(translationUnitDecl(has(typeAliasDecl()))))));
830 hasDescendant(declRefExpr(to(varTemplateSpecializationDecl()))),
831 unless(hasAncestor(translationUnitDecl(has(varDecl(
831 unless(hasAncestor(translationUnitDecl(has(varDecl(
845 functionDecl(hasDescendant(
846 returnStmt(has(implicitCastExpr(has(declRefExpr())))))));
846 returnStmt(has(implicitCastExpr(has(declRefExpr())))))));
863 classTemplateDecl(has(cxxRecordDecl(has(
863 classTemplateDecl(has(cxxRecordDecl(has(
879 functionTemplateDecl(hasDescendant(sizeOfPackExpr())));
889 varDecl(hasType(classTemplateSpecializationDecl(has(fieldDecl(hasType(
909 functionDecl(hasDescendant(typeTraitExpr(hasType(asString("int"))))));
924 hasDescendant(varDecl(
925 hasName("a"), hasInitializer(hasDescendant(cxxTypeidExpr())))),
926 hasDescendant(varDecl(
927 hasName("b"), hasInitializer(hasDescendant(cxxTypeidExpr()))))));
938 classTemplateDecl(has(cxxRecordDecl(has(
938 classTemplateDecl(has(cxxRecordDecl(has(
939 functionDecl(hasDescendant(
952 has(declStmt(hasSingleDecl(varDecl(hasName("d")))))))));
994 hasDescendant(unaryExprOrTypeTraitExpr()))));
1023 functionDecl(hasDescendant(
1024 callExpr(has(cxxPseudoDestructorExpr())))));
1033 functionDecl(hasDescendant(usingDecl())));
1055 namespaceDecl(has(usingShadowDecl())));
1068 functionTemplateDecl(hasDescendant(unresolvedLookupExpr())));
1081 functionTemplateDecl(hasDescendant(
1082 binaryOperator(has(cxxUnresolvedConstructExpr())))));
1091 functionTemplateDecl(hasDescendant(
1092 binaryOperator(has(cxxUnresolvedConstructExpr())))));
1104 functionTemplateDecl(hasAncestor(translationUnitDecl(
1105 unless(has(functionDecl(hasName("declToImport"))))))));
1110 classTemplateDecl(hasAncestor(translationUnitDecl(
1111 unless(has(cxxRecordDecl(hasName("declToImport"))))))));
1124 recordDecl(has(classTemplateDecl()),
1125 has(classTemplateSpecializationDecl())));
1135 cxxRecordDecl(has(cxxMethodDecl(hasDescendant(
1135 cxxRecordDecl(has(cxxMethodDecl(hasDescendant(
1146 classTemplateDecl(has(cxxRecordDecl(
1147 has(fieldDecl(hasType(dependentSizedArrayType())))))));
1406 translationUnitDecl(unless(has(classTemplateSpecializationDecl())));
1414 Pattern = translationUnitDecl(has(classTemplateDecl(
1415 hasName("Base"), has(classTemplateSpecializationDecl()))));
1452 auto Pattern = namespaceDecl(has(classTemplateDecl(
1453 hasName("X"), unless(has(classTemplateSpecializationDecl())))));
1459 Pattern = namespaceDecl(has(classTemplateSpecializationDecl(hasName("X"))));
1535 auto Matcher = cxxRecordDecl(has(cxxRecordDecl()));
1553 auto Matcher = classTemplateDecl(has(cxxRecordDecl(has(cxxRecordDecl()))));
1553 auto Matcher = classTemplateDecl(has(cxxRecordDecl(has(cxxRecordDecl()))));
1569 auto hasImplicitClass = has(cxxRecordDecl());
1570 auto Pattern = translationUnitDecl(has(classTemplateDecl(
1572 has(classTemplateSpecializationDecl(hasImplicitClass)))));
1614 auto Pattern = translationUnitDecl(has(classTemplateDecl(
1616 has(classTemplateSpecializationDecl(has(fieldDecl(hasName("a"))))))));
1616 has(classTemplateSpecializationDecl(has(fieldDecl(hasName("a"))))))));
2052 cxxMethodDecl(hasName("f"), hasParent(cxxRecordDecl(hasName("D"))));
2069 cxxMethodDecl(hasName("f"), hasParent(cxxRecordDecl(hasName("B"))));
2112 cxxMethodDecl(hasName("f"), hasParent(cxxRecordDecl(hasName("B"))));
2114 cxxMethodDecl(hasName("f"), hasParent(cxxRecordDecl(hasName("D"))));
2142 cxxMethodDecl(hasName("f"), hasParent(cxxRecordDecl(hasName("B"))));
2144 cxxMethodDecl(hasName("f"), hasParent(cxxRecordDecl(hasName("D"))));
2146 hasName("f"), hasParent(cxxRecordDecl(hasName("B"))), isDefinition());
2148 hasName("f"), hasParent(cxxRecordDecl(hasName("D"))), isDefinition());
2180 cxxMethodDecl(hasName("f"), hasParent(cxxRecordDecl(hasName("B"))));
2182 hasName("f"), hasParent(cxxRecordDecl(hasName("B"))), isDefinition());
2183 auto DFP = cxxMethodDecl(hasName("f"), hasParent(cxxRecordDecl(hasName("D"))),
2233 cxxMethodDecl(hasName("f"), hasParent(cxxRecordDecl(hasName("B"))));
2235 hasName("f"), hasParent(cxxRecordDecl(hasName("B"))), isDefinition());
2237 cxxMethodDecl(hasName("f"), hasParent(cxxRecordDecl(hasName("D"))));
2239 hasName("f"), hasParent(cxxRecordDecl(hasName("D"))), isDefinition());
2389 ToD, functionDecl(hasName("f"), hasDescendant(declRefExpr()))));
2416 ToTU, translationUnitDecl(hasDescendant(
2417 functionDecl(hasName("f"), hasDescendant(declRefExpr()))))));
2641 ToTU, functionDecl(unless(hasParent(friendDecl()))));
2907 enumDecl(has(enumConstantDecl(hasName("THING_VALUE"))),
2947 functionTemplateDecl(has(functionDecl(has(compoundStmt(
2947 functionTemplateDecl(has(functionDecl(has(compoundStmt(
2948 has(cStyleCastExpr(has(dependentScopeDeclRefExpr())))))))));
2948 has(cStyleCastExpr(has(dependentScopeDeclRefExpr())))))))));
2958 functionTemplateDecl(has(functionDecl(has(compoundStmt(
2958 functionTemplateDecl(has(functionDecl(has(compoundStmt(
2959 has(callExpr(has(dependentScopeDeclRefExpr())))))))));
2959 has(callExpr(has(dependentScopeDeclRefExpr())))))))));
2971 classTemplateDecl(has(
2972 cxxRecordDecl(has(typedefDecl(has(dependentNameType())))))));
2972 cxxRecordDecl(has(typedefDecl(has(dependentNameType())))))));
2984 functionTemplateDecl(has(functionDecl(has(
2984 functionTemplateDecl(has(functionDecl(has(
2985 compoundStmt(has(callExpr(has(unresolvedMemberExpr())))))))));
2985 compoundStmt(has(callExpr(has(unresolvedMemberExpr())))))))));
3254 R0, recordDecl(has(fieldDecl(hasName("next"))))));
3256 R1, recordDecl(has(fieldDecl(hasName("next"))))));
3367 hasParent(classTemplateSpecializationDecl()));
3454 hasParent(classTemplateSpecializationDecl()));
3774 auto Pattern = cxxRecordDecl(has(friendDecl()));
3793 has(cxxRecordDecl(has(friendDecl(has(classTemplateDecl()))))));
3793 has(cxxRecordDecl(has(friendDecl(has(classTemplateDecl()))))));
3793 has(cxxRecordDecl(has(friendDecl(has(classTemplateDecl()))))));
4060 unless(has(functionDecl(hasName("f"), isTemplateInstantiation()))));
4084 auto Pattern = translationUnitDecl(unless(has(Instantiation)));
4108 auto Pattern = translationUnitDecl(has(Specialization));
4130 hasParent(translationUnitDecl()));
4386 hasParent(recordDecl(hasName("A"))))));
4391 hasParent(recordDecl(hasName("B"))))));
4396 hasParent(translationUnitDecl()))));
4653 fieldDecl(hasParent(cxxRecordDecl(hasParent(classTemplateDecl())))));
4653 fieldDecl(hasParent(cxxRecordDecl(hasParent(classTemplateDecl())))));
5213 functionDecl(hasName("foo"), hasAncestor(cxxRecordDecl(hasName("A"))));
5215 functionDecl(hasName("foo"), hasAncestor(cxxRecordDecl(hasName("B"))));
5217 functionDecl(hasName("foo"), hasAncestor(cxxRecordDecl(hasName("C"))));
tools/clang/unittests/AST/DeclPrinterTest.cpp 1300 hasDescendant(namedDecl(hasName("printThis")))).bind("id"),
tools/clang/unittests/AST/OMPStructuredBlockTest.cpp 35 unless(hasDescendant(stmt(isOMPStructuredBlock()))))
361 hasAncestor(ompExecutableDirective(ompSectionsDirective())),
362 unless(hasAncestor(ompExecutableDirective(ompSectionDirective()))))
tools/clang/unittests/AST/SourceLocationTest.cpp 526 Code, friendDecl(has(cxxConstructorDecl(ofClass(hasName("B")))))));
530 Code, friendDecl(has(cxxDestructorDecl(ofClass(hasName("B")))))));
544 Code, friendDecl(has(cxxConstructorDecl(ofClass(hasName("B")))))));
548 Code, friendDecl(has(cxxDestructorDecl(ofClass(hasName("B")))))));
619 friendDecl(hasParent(cxxRecordDecl(isTemplateInstantiation())))));
tools/clang/unittests/AST/StmtPrinterTest.cpp 38 has(compoundStmt(has(stmt().bind("id")))));
38 has(compoundStmt(has(stmt().bind("id")))));
tools/clang/unittests/ASTMatchers/ASTMatchersInternalTest.cpp 55 DeclarationMatcher HasClassB = just(has(recordDecl(hasName("B")).bind("b")));
tools/clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp 51 DeclarationMatcher HasClassX = recordDecl(has(recordDecl(hasName("X"))));
56 recordDecl(hasName("Y"), has(recordDecl(hasName("X"))));
66 has(recordDecl(
67 has(recordDecl(hasName("X"))),
68 has(recordDecl(hasName("Y"))),
70 has(recordDecl(
71 has(recordDecl(hasName("A"))),
72 has(recordDecl(hasName("B"))),
125 has(recordDecl(
127 has(recordDecl(
129 has(recordDecl(
132 has(recordDecl(
135 has(recordDecl(
137 has(recordDecl(
168 has(recordDecl(hasName("Z"))),
170 has(recordDecl(hasName("Y")))));
193 hasDescendant(recordDecl(hasName("X"))),
208 hasDescendant(recordDecl(has(recordDecl(hasName("Y"))),
208 hasDescendant(recordDecl(has(recordDecl(hasName("Y"))),
231 hasDescendant(recordDecl(hasDescendant(recordDecl(hasName("Y"))),
231 hasDescendant(recordDecl(hasDescendant(recordDecl(hasName("Y"))),
252 decl(hasDescendant(typeLoc().bind("x")), has(decl()));
252 decl(hasDescendant(typeLoc().bind("x")), has(decl()));
262 decl(hasDescendant(VD), hasDescendant(RD))));
262 decl(hasDescendant(VD), hasDescendant(RD))));
264 decl(hasDescendant(RD), hasDescendant(VD))));
264 decl(hasDescendant(RD), hasDescendant(VD))));
267 decl(anyOf(hasDescendant(RD), hasDescendant(VD)))));
267 decl(anyOf(hasDescendant(RD), hasDescendant(VD)))));
276 forEach(fieldDecl(hasAncestor(forStmt()))));
276 forEach(fieldDecl(hasAncestor(forStmt()))));
322 cxxCatchStmt(anyOf(hasDescendant(varDecl()), isCatchAll()))));
688 DeclarationMatcher ClassX = has(recordDecl(hasName("::X")).bind("x"));
697 recordDecl(hasName("A"), has(recordDecl(hasName("B")).bind("b"))));
735 recordDecl(hasName("A"), hasDescendant(ClassX)),
736 recordDecl(hasName("B"), hasDescendant(ClassX)))),
791 cxxOperatorCallExpr(hasParent(cxxOperatorCallExpr()))));
796 cxxOperatorCallExpr(hasDescendant(cxxOperatorCallExpr()))));
1818 recordDecl(eachOf(has(fieldDecl(hasName("a")).bind("v")),
1819 has(fieldDecl(hasName("b")).bind("v")))),
1826 recordDecl(eachOf(has(fieldDecl(hasName("a")).bind("v")),
1827 has(fieldDecl(hasName("b")).bind("v")))),
1831 recordDecl(eachOf(has(fieldDecl(hasName("a")).bind("v")),
1832 has(fieldDecl(hasName("b")).bind("v")))),
1836 recordDecl(eachOf(has(fieldDecl(hasName("a")).bind("v")),
1837 has(fieldDecl(hasName("b")).bind("v"))))));
1850 cxxRecordDecl(isTemplateInstantiation(), hasDescendant(
1865 cxxRecordDecl(isTemplateInstantiation(), hasDescendant(
1874 unless(hasDescendant(varDecl(hasName("t")))))));
2264 hasAncestor(namespaceDecl(hasName("filesystem"),
2290 hasParent(stmt(has(stmt(equalsBoundNode("if")))))))));
2290 hasParent(stmt(has(stmt(equalsBoundNode("if")))))))));
2294 stmt(allOf(ifStmt().bind("if"), has(stmt(equalsBoundNode("if")))))));
2301 hasParent(decl(has(decl(equalsBoundNode("record")))))))));
2301 hasParent(decl(has(decl(equalsBoundNode("record")))))))));
2305 has(decl(equalsBoundNode("record")))))));
2312 has(fieldDecl(hasName("a"), hasType(type().bind("t")))),
2313 has(fieldDecl(hasName("b"), hasType(type(equalsBoundNode("t"))))))));
2318 has(fieldDecl(hasName("a"), hasType(type().bind("t")))),
2319 has(fieldDecl(hasName("b"), hasType(type(equalsBoundNode("t"))))))));
2337 forEachDescendant(varDecl(hasType(
2351 hasName("f"), forEachDescendant(varDecl().bind("d")),
2352 forEachDescendant(declRefExpr(to(decl(equalsBoundNode("d")))))),
2366 unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr(
2366 unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr(
2382 unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr(
2382 unless(hasAncestor(stmt(hasDescendant(cxxMemberCallExpr(
tools/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp 133 hasDescendant(fieldDecl(hasName("a"))))));
140 hasDescendant(fieldDecl(hasName("a"))))));
169 functionDecl(hasName("f"), hasParent(friendDecl()))));
550 hasDescendant(declRefExpr(to(
778 has(
781 has(
784 has(floatLiteral(equals(1.0))),
785 has(implicitValueInitExpr(
787 has(
790 has(floatLiteral(equals(2.0))),
791 has(floatLiteral(equals(1.0)))))
798 has(
801 hasDescendant(floatLiteral(
803 hasDescendant(integerLiteral(
805 has(
808 hasDescendant(floatLiteral(
810 hasDescendant(integerLiteral(
812 has(
815 hasDescendant(floatLiteral(
817 hasDescendant(integerLiteral(
826 varDecl(hasInitializer(parenListExpr(has(unaryOperator()))))));
839 has(stringLiteral()))));
881 has(
1101 cxxConstructExpr(has(cxxStdInitializerListExpr()),
1105 cxxConstructExpr(has(cxxStdInitializerListExpr()),
1551 "", match(stmt(hasParent(
1552 stmt(has(stmt(equalsNode(TypedNode)))).bind(""))),
1560 "", match(decl(hasParent(
1561 decl(has(decl(equalsNode(TypedNode)))).bind(""))),
1570 "", match(fieldDecl(hasParent(decl(has(fieldDecl(
1570 "", match(fieldDecl(hasParent(decl(has(fieldDecl(
tools/clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp 67 decl(hasDescendant(loc(builtinType())))));
69 stmt(hasDescendant(builtinType()))));
72 stmt(hasDescendant(loc(builtinType())))));
74 stmt(hasDescendant(qualType(builtinType())))));
77 stmt(hasDescendant(isInteger()))));
81 functionDecl(forEachDescendant(
82 varDecl(hasDescendant(isInteger())).bind("x"))),
88 qualType(hasDescendant(builtinType()))));
90 qualType(hasDescendant(
93 typeLoc(hasDescendant(loc(builtinType())))));
97 qualType(asString("int ***"), forEachDescendant(pointerType().bind("x"))),
104 varDecl(hasName("i"), has(isInteger()))));
106 varDecl(hasName("i"), has(isInteger()))));
109 qualType(functionType(), forEach(qualType(isInteger()).bind("x"))),
116 varDecl(hasName("i"), hasType(qualType(has(builtinType()))))));
119 varDecl(hasName("i"), hasType(qualType(has(pointerType()))))));
125 has(ignoringParenImpCasts(declRefExpr(to(varDecl(hasName("i")))))));
136 hasDescendant(declRefExpr(to(varDecl(hasName("i"))))));
160 recordDecl(hasName("A"), has(recordDecl(hasName("B")))));
712 forEachDescendant(varDecl().bind("v")),
713 forEachDescendant(callExpr(forEachArgumentWithParam(
838 hasDescendant(declRefExpr(to(fieldDecl(hasName("next"))))))))));
1330 recordDecl(hasName("C"), hasDescendant(callExpr(
1495 exprWithCleanups(has(ignoringElidableConstructorCall(callExpr())))))),
1551 varDecl(has(ignoringImplicit(cxxConstructExpr())))));
1584 hasInitializer(exprWithCleanups(has(
1585 cxxConstructExpr(has(expr(ignoringImplicit(cxxConstructExpr(
1586 has(expr(ignoringImplicit(callExpr())))
1595 notMatches("class C {}; C a = C();", varDecl(has(cxxConstructExpr()))));
1750 hasSourceExpression(hasDescendant(
1804 ifStmt(has(switchStmt(forEachSwitchCase(defaultStmt()))))));
1808 constantExpr(has(integerLiteral()))))))));
1812 constantExpr(has(integerLiteral()))))))));
1816 constantExpr(has(integerLiteral()))))))));
1829 cxxConversionDecl(hasExplicitSpecifier(constantExpr(has(cxxBoolLiteral())))),
1833 cxxConversionDecl(hasExplicitSpecifier(constantExpr(has(cxxBoolLiteral())))),
1837 cxxConversionDecl(hasExplicitSpecifier(constantExpr(has(cxxBoolLiteral())))),
1841 cxxConversionDecl(hasExplicitSpecifier(constantExpr(has(cxxBoolLiteral())))),
1845 cxxConstructorDecl(hasExplicitSpecifier(constantExpr(has(cxxBoolLiteral())))),
1849 cxxConstructorDecl(hasExplicitSpecifier(constantExpr(has(cxxBoolLiteral())))),
1853 cxxConstructorDecl(hasExplicitSpecifier(constantExpr(has(cxxBoolLiteral())))),
1859 hasExplicitSpecifier(constantExpr(has(cxxBoolLiteral())))),
1864 constantExpr(has(cxxBoolLiteral())))),
1869 constantExpr(has(cxxBoolLiteral())))),
1896 recordDecl(hasName("C"), forEach(fieldDecl(hasName("x")).bind("x"))),
1902 recordDecl(hasName("C"), forEach(fieldDecl().bind("f"))),
1910 forEach(recordDecl(forEach(fieldDecl().bind("f"))))),
1910 forEach(recordDecl(forEach(fieldDecl().bind("f"))))),
1917 forEachDescendant(fieldDecl(hasName("x")).bind("x"))),
1926 recordDecl(hasName("A"), anyOf(m, forEachDescendant(m))),
1934 recordDecl(hasName("A"), allOf(hasDescendant(m), anyOf(m, anything()))),
1942 recordDecl(hasName("C"), forEachDescendant(fieldDecl().bind("f"))),
1950 recordDecl(hasName("C"), forEachDescendant(recordDecl(
1951 forEachDescendant(fieldDecl().bind("f"))))),
1959 compoundStmt(forEachDescendant(ifStmt().bind("if")),
1960 forEachDescendant(whileStmt().bind("while"))),
1966 "class X { int a; };", recordDecl(decl().bind("x"), has(fieldDecl())),
1994 anyOf(forEachDescendant(recordDecl(hasName("Y"))), anything())),
2013 has(cxxConstructorDecl(
2027 has(compoundStmt(hasAnySubstatement(ifStmt())))),
2046 functionDecl(decl().bind("x"), hasAncestor(recordDecl(hasName("::A")))),
2053 ifStmt(stmt().bind("x"), hasAncestor(recordDecl(hasName("::A")))),
2069 recordDecl(hasName("C"), forEachDescendant(decl().bind("decl"))),
2073 recordDecl(hasName("C"), forEachDescendant(decl().bind("decl"))),
2108 recordDecl(hasName("C"), hasAncestor(recordDecl(hasName("A"))))));
2114 recordDecl(hasName("C"), hasAncestor(recordDecl(hasName("X"))))));
2121 hasAncestor(recordDecl(hasName("A"))))))));
2127 integerLiteral(equals(42), hasAncestor(ifStmt()))));
2133 integerLiteral(equals(42), hasAncestor(functionDecl(hasName("f"))))));
2139 fieldDecl(hasAncestor(recordDecl(hasAncestor(recordDecl().bind("r"))))),
2139 fieldDecl(hasAncestor(recordDecl(hasAncestor(recordDecl().bind("r"))))),
2146 fieldDecl(hasAncestor(
2148 hasDescendant(recordDecl(isDefinition(),
2149 hasAncestor(recordDecl())))
2164 hasAncestor(functionDecl(hasParameter(
2174 hasAncestor(recordDecl(hasName("A"))))));
2182 hasAncestor(recordDecl(hasName("A")))))))));
2188 compoundStmt(hasParent(ifStmt()))));
2191 compoundStmt(hasParent(ifStmt()))));
2194 compoundStmt(hasParent(ifStmt()))));
2204 hasAncestor(cxxRecordDecl(isTemplateInstantiation())),
2205 hasAncestor(cxxRecordDecl(unless(isTemplateInstantiation())))))));
2213 declRefExpr(to(decl(hasAncestor(decl()))))));
2221 memberExpr(member(hasAncestor(decl())))));
2228 memberExpr(member(hasAncestor(decl())))));
2235 declRefExpr(to(decl(hasAncestor(decl()))))));
2245 declRefExpr(to(decl(hasAncestor(decl()))))));
2252 declRefExpr(to(decl(hasAncestor(decl()))))));
2261 hasParent(compoundStmt(hasParent(functionDecl(
2261 hasParent(compoundStmt(hasParent(functionDecl(
2262 hasParent(cxxRecordDecl(isTemplateInstantiation())))))))));
2268 hasParent(compoundStmt(hasParent(functionDecl(hasParent(
2268 hasParent(compoundStmt(hasParent(functionDecl(hasParent(
2268 hasParent(compoundStmt(hasParent(functionDecl(hasParent(
2274 hasParent(compoundStmt(
2275 allOf(hasParent(functionDecl(hasParent(
2275 allOf(hasParent(functionDecl(hasParent(
2277 hasParent(functionDecl(hasParent(cxxRecordDecl(
2277 hasParent(functionDecl(hasParent(cxxRecordDecl(
2282 compoundStmt(hasParent(recordDecl()))));
2383 hasDescendant(nestedNameSpecifier(
2388 has(nestedNameSpecifier(
2393 has(nestedNameSpecifier(
2401 forEach(nestedNameSpecifier().bind("x"))),
2411 decl(hasDescendant(nestedNameSpecifier(specifiesType(
2416 forEachDescendant(nestedNameSpecifier().bind("x"))),
2428 hasDescendant(loc(nestedNameSpecifier(
2433 has(loc(nestedNameSpecifier(
2438 has(loc(nestedNameSpecifier(
2444 forEach(nestedNameSpecifierLoc().bind("x"))),
2454 decl(hasDescendant(loc(nestedNameSpecifier(specifiesType(
2459 forEachDescendant(nestedNameSpecifierLoc().bind("x"))),
2487 "X", decl(hasDescendant(recordDecl(hasName("X::Y")).bind("Y"))),
2492 "X", decl(hasDescendant(recordDecl(hasName("X::Z")).bind("Z"))),
2500 "if", stmt(hasDescendant(forStmt().bind("for"))), "for")));
2504 "if", stmt(hasDescendant(declStmt().bind("decl"))), "decl")));
2511 "X", recordDecl(has(recordDecl(hasName("X::Y")).bind("Y"))), "Y")));
2515 "X", recordDecl(has(recordDecl(hasName("X::Z")).bind("Z"))), "Z")));
2545 has(unaryOperator(hasOperatorName("*"))))));
2550 has(integerLiteral()))));
2555 has(integerLiteral()))));
tools/clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp 373 has(fieldDecl(hasName("Foo"))),
tools/clang/unittests/Analysis/ExprMutationAnalyzerTest.cpp 51 return expr(Matcher, hasAncestor(compoundStmt().bind("stmt"))).bind("expr");
tools/clang/unittests/StaticAnalyzer/Reusables.h 24 auto Matches = match(decl(hasDescendant(What.bind("root"))),
tools/clang/unittests/Tooling/RangeSelectorTest.cpp 98 hasDescendant(
101 decl(hasDescendant(cxxCtorInitializer(isBaseInitializer())
tools/clang/unittests/Tooling/SourceCodeBuildersTest.cpp 36 hasDescendant(compoundStmt(hasAnySubstatement(Matcher))));
tools/clang/unittests/Tooling/StencilTest.cpp 40 hasDescendant(compoundStmt(hasAnySubstatement(Matcher))));
90 stmt(hasDescendant(
92 hasDeclaration(decl(hasDescendant(cxxCtorInitializer(