reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

Declarations

tools/clang/include/clang/ASTMatchers/ASTMatchers.h
 2904     hasParent;

References

tools/clang/lib/ASTMatchers/Dynamic/Registry.cpp
  295   REGISTER_MATCHER(hasParent);
tools/clang/lib/Analysis/ExprMutationAnalyzer.cpp
  238                     unless(hasParent(implicitCastExpr(hasCastKind(CK_NoOp)))),
  242                unless(hasParent(arraySubscriptExpr())),
  374               hasParent(declStmt().bind("stmt")),
  377               unless(hasParent(declStmt(hasParent(
  377               unless(hasParent(declStmt(hasParent(
tools/clang/tools/extra/clang-change-namespace/ChangeNamespace.cpp
  417                                    IsInMovedNs, hasParent(namespaceDecl()))
  424                         IsInMovedNs, hasParent(namespaceDecl()))
  442       usingDecl(hasAnyUsingShadowDecl(decl()), hasParent(cxxRecordDecl()));
  451               unless(anyOf(hasParent(typeLoc(loc(qualType(
  454                            hasParent(nestedNameSpecifierLoc()),
  506                    hasParent(namespaceDecl()));
  515       hasGlobalStorage(), hasParent(namespaceDecl()),
  523   auto UnscopedEnumMatcher = enumConstantDecl(hasParent(enumDecl(
  524       hasParent(namespaceDecl()),
tools/clang/tools/extra/clang-include-fixer/find-all-symbols/FindAllSymbols.cpp
  167   auto Functions = functionDecl(CommonFilter, unless(hasParent(friendDecl())),
  211                   to(functionDecl(hasParent(
tools/clang/tools/extra/clang-move/Move.cpp
  525       hasParent(decl(anyOf(namespaceDecl(), translationUnitDecl()))),
  541       hasParent(decl(anyOf(namespaceDecl(), translationUnitDecl()))), InOldCC);
  571   auto InAnonymousNS = hasParent(namespaceDecl(isAnonymous()));
tools/clang/tools/extra/clang-tidy/abseil/DurationDivisionCheck.cpp
   33           unless(hasParent(cxxStaticCastExpr())),
   34           unless(hasParent(cStyleCastExpr())),
tools/clang/tools/extra/clang-tidy/abseil/NoInternalDependenciesCheck.cpp
   30                                  hasParent(namespaceDecl(hasName("absl")))))),
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"))),
tools/clang/tools/extra/clang-tidy/abseil/UpgradeDurationConversionsCheck.cpp
   41               hasParent(functionTemplateDecl()),
   53               hasParent(functionTemplateDecl()),
   65                    hasParent(functionTemplateDecl()),
   79                    hasParent(functionTemplateDecl()),
  108           hasParent(callExpr(
  110                                   unless(hasParent(functionTemplateDecl())))),
tools/clang/tools/extra/clang-tidy/bugprone/BoolPointerImplicitConversionCheck.cpp
   22                  unless(hasParent(unaryOperator(hasOperatorName("!")))),
tools/clang/tools/extra/clang-tidy/bugprone/BranchCloneCheck.cpp
   63              hasParent(stmt(unless(ifStmt(hasElse(equalsBoundNode("if")))))),
tools/clang/tools/extra/clang-tidy/bugprone/ForwardDeclarationNamespaceCheck.cpp
   35           hasParent(decl(anyOf(namespaceDecl(), translationUnitDecl()))),
tools/clang/tools/extra/clang-tidy/bugprone/ForwardingReferenceOverloadCheck.cpp
   81           unless(hasParent(functionTemplateDecl(has(templateTypeParmDecl(
tools/clang/tools/extra/clang-tidy/bugprone/UndelegatedConstructorCheck.cpp
   64           hasParent(
tools/clang/tools/extra/clang-tidy/bugprone/UnusedRaiiCheck.cpp
   40                        hasParent(compoundStmt().bind("compound")),
tools/clang/tools/extra/clang-tidy/bugprone/UnusedReturnValueCheck.cpp
   68                    unless(hasParent(stmtExpr())));
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp
   45                        unless(hasParent(castExpr())),
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.cpp
   61           unless(hasParent(arraySubscriptExpr())),
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
  265       hasParent(cxxRecordDecl(unless(isTriviallyDefaultConstructible()))));
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/SlicingCheck.cpp
   46       hasParent(cxxConstructorDecl(ofClass(equalsBoundNode("DerivedDecl"))));
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())),
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"),
   30   Finder->addMatcher(callExpr(callee(ReturnsErrFn), hasParent(NonCheckingStmts))
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())))),
tools/clang/tools/extra/clang-tidy/modernize/RawStringLiteralCheck.cpp
  126       stringLiteral(unless(hasParent(predefinedExpr()))).bind("lit"), this);
tools/clang/tools/extra/clang-tidy/modernize/UseBoolLiteralsCheck.cpp
   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)));
tools/clang/tools/extra/clang-tidy/modernize/UseEqualsDeleteCheck.cpp
   46                        hasParent(cxxRecordDecl(hasMethod(unless(
tools/clang/tools/extra/clang-tidy/performance/InefficientVectorOperationCheck.cpp
  117       hasParent(compoundStmt(has(TargetVarDefStmt)).bind(LoopParentName));
tools/clang/tools/extra/clang-tidy/readability/ContainerSizeEmptyCheck.cpp
   48       hasParent(binaryOperator(
   53       hasParent(implicitCastExpr(
   56               hasParent(unaryOperator(hasOperatorName("!")).bind("NegOnSize")),
   58       hasParent(explicitCastExpr(hasDestinationType(booleanType()))));
tools/clang/tools/extra/clang-tidy/readability/ImplicitBoolConversionCheck.cpp
  269                  hasParent(explicitCastExpr())));
  291               hasParent(stmt(anyOf(ifStmt(), whileStmt()), has(declStmt())))),
  296           anyOf(hasParent(stmt().bind("parentStmt")), anything()),
  320           unless(hasParent(binaryOperator(anyOf(
  323           unless(hasParent(bitfieldConstruct)),
  325           anyOf(hasParent(implicitCastExpr().bind("furtherImplicitCast")),
tools/clang/tools/extra/clang-tidy/readability/IsolateDeclarationCheck.cpp
   29                               hasParent(compoundStmt()))
tools/clang/tools/extra/clang-tidy/readability/RedundantDeclarationCheck.cpp
   35                           hasParent(friendDecl()))))))
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/SimplifyBooleanExprCheck.cpp
  453                               unless(hasParent(ifStmt())),
  481         ifStmt(unless(hasParent(ifStmt())), hasThen(Then), hasElse(Else))
tools/clang/tools/extra/clang-tidy/readability/StaticDefinitionInAnonymousNamespaceCheck.cpp
   25                 hasParent(namespaceDecl(isAnonymous())))
tools/clang/tools/extra/clang-tidy/readability/UppercaseLiteralSuffixCheck.cpp
  202            unless(anyOf(hasParent(userDefinedLiteral()),
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()))))));
  114                                 hasParent(cxxRecordDecl(
  115                                     isImplicit(), hasParent(lambdaExpr())))))),
tools/clang/unittests/AST/ASTImporterTest.cpp
 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());
 2641       ToTU, functionDecl(unless(hasParent(friendDecl()))));
 3367                          hasParent(classTemplateSpecializationDecl()));
 3454                          hasParent(classTemplateSpecializationDecl()));
 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())))));
tools/clang/unittests/AST/SourceLocationTest.cpp
  619       friendDecl(hasParent(cxxRecordDecl(isTemplateInstantiation())))));
tools/clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
  791                       cxxOperatorCallExpr(hasParent(cxxOperatorCallExpr()))));
 2290                        hasParent(stmt(has(stmt(equalsBoundNode("if")))))))));
 2301                hasParent(decl(has(decl(equalsBoundNode("record")))))))));
tools/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp
  169                       functionDecl(hasName("f"), hasParent(friendDecl()))));
 1551       "", match(stmt(hasParent(
 1560       "", match(decl(hasParent(
 1570       "", match(fieldDecl(hasParent(decl(has(fieldDecl(
tools/clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
 2188     compoundStmt(hasParent(ifStmt()))));
 2191     compoundStmt(hasParent(ifStmt()))));
 2194     compoundStmt(hasParent(ifStmt()))));
 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()))));