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

Declarations

tools/clang/include/clang/ASTMatchers/ASTMatchers.h
 1121     cxxMethodDecl;

References

tools/clang/include/clang/ASTMatchers/ASTMatchers.h
 4014   unsigned ArgIndex = cxxOperatorCallExpr(callee(cxxMethodDecl()))
tools/clang/lib/ASTMatchers/Dynamic/Registry.cpp
  182   REGISTER_MATCHER(cxxMethodDecl);
tools/clang/lib/Analysis/ExprMutationAnalyzer.cpp
   71       hasMethod(cxxMethodDecl(isMoveAssignmentOperator(), unless(isDeleted()))),
   74                    hasMethod(cxxMethodDecl(isCopyAssignmentOperator(),
  218   const auto NonConstMethod = cxxMethodDecl(unless(isConst()));
  249                           callee(cxxMethodDecl(ofClass(isMoveOnly()),
  357                         callee(cxxMethodDecl(ofClass(isMoveOnly()),
tools/clang/tools/extra/clang-change-namespace/ChangeNamespace.cpp
  503       functionDecl(unless(anyOf(cxxMethodDecl(), IsInMovedNs,
tools/clang/tools/extra/clang-move/Move.cpp
  622       cxxMethodDecl(InOldFiles, ofOutermostEnclosingClass(*HasAnySymbolNames),
tools/clang/tools/extra/clang-tidy/abseil/RedundantStrcatCallsCheck.cpp
   65   const auto IsAlphanum = hasDeclaration(cxxMethodDecl(hasName("AlphaNum")));
tools/clang/tools/extra/clang-tidy/abseil/StringFindStartswithCheck.cpp
   43       callee(cxxMethodDecl(hasName("find"))),
tools/clang/tools/extra/clang-tidy/abseil/UpgradeDurationConversionsCheck.cpp
   51           callee(cxxMethodDecl(
tools/clang/tools/extra/clang-tidy/bugprone/DanglingHandleCheck.cpp
   28       anyOf(cxxConstructExpr(hasDeclaration(cxxMethodDecl(ofClass(IsAHandle))),
   85           cxxOperatorCallExpr(callee(cxxMethodDecl(ofClass(isAMap()))),
  130       cxxOperatorCallExpr(callee(cxxMethodDecl(ofClass(IsAHandle))),
tools/clang/tools/extra/clang-tidy/bugprone/ExceptionEscapeCheck.cpp
   61                          cxxMethodDecl(isMoveAssignmentOperator()),
tools/clang/tools/extra/clang-tidy/bugprone/InaccurateEraseCheck.cpp
   32                         cxxMemberCallExpr(callee(cxxMethodDecl(hasName("end"))))
   42           callee(cxxMethodDecl(hasName("erase"))), argumentCountIs(1),
tools/clang/tools/extra/clang-tidy/bugprone/ParentVirtualCallCheck.cpp
   93           callee(cxxMethodDecl(isVirtual()))),
tools/clang/tools/extra/clang-tidy/bugprone/SizeofContainerCheck.cpp
   26                         hasMethod(cxxMethodDecl(hasName("size"), isPublic(),
tools/clang/tools/extra/clang-tidy/bugprone/StringConstructorCheck.cpp
   67           hasDeclaration(cxxMethodDecl(hasName("basic_string"))),
   86           hasDeclaration(cxxMethodDecl(hasName("basic_string"))),
  106       cxxConstructExpr(hasDeclaration(cxxMethodDecl(hasName("basic_string"))),
tools/clang/tools/extra/clang-tidy/bugprone/StringIntegerAssignmentCheck.cpp
   27           callee(cxxMethodDecl(ofClass(classTemplateSpecializationDecl(
tools/clang/tools/extra/clang-tidy/bugprone/StringLiteralWithEmbeddedNulCheck.cpp
   43                        hasDeclaration(cxxMethodDecl(hasName("basic_string")))),
   47                        hasDeclaration(cxxMethodDecl(hasName("basic_string"))),
tools/clang/tools/extra/clang-tidy/bugprone/UnhandledSelfAssignmentCheck.cpp
   36   const auto IsUserDefined = cxxMethodDecl(
   42       cxxMethodDecl(hasParameter(0, parmVarDecl(hasType(referenceType()))));
   46   const auto HasNoSelfCheck = cxxMethodDecl(unless(hasDescendant(
   53   const auto HasNonTemplateSelfCopy = cxxMethodDecl(
   61   const auto HasTemplateSelfCopy = cxxMethodDecl(
   73       cxxMethodDecl(unless(hasDescendant(cxxMemberCallExpr(callee(cxxMethodDecl(
   73       cxxMethodDecl(unless(hasDescendant(cxxMemberCallExpr(callee(cxxMethodDecl(
   76   DeclarationMatcher AdditionalMatcher = cxxMethodDecl();
   89     AdditionalMatcher = cxxMethodDecl(ofClass(cxxRecordDecl(
   94   Finder->addMatcher(cxxMethodDecl(ofClass(cxxRecordDecl().bind("class")),
tools/clang/tools/extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp
  306                    callee(cxxMethodDecl(hasAnyName("clear", "assign")))),
  310                    callee(cxxMethodDecl(hasName("reset")))),
  314                    callee(cxxMethodDecl(hasAttr(clang::attr::Reinitializes)))),
tools/clang/tools/extra/clang-tidy/bugprone/VirtualNearMissCheck.cpp
  222       cxxMethodDecl(
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/SlicingCheck.cpp
   50       callExpr(callee(cxxMethodDecl(anyOf(isCopyAssignmentOperator(),
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp
   45               has(cxxMethodDecl(isCopyAssignmentOperator(),
   50               has(cxxMethodDecl(isMoveAssignmentOperator(),
tools/clang/tools/extra/clang-tidy/google/DefaultArgumentsCheck.cpp
   21       cxxMethodDecl(anyOf(isOverride(), isVirtual()),
tools/clang/tools/extra/clang-tidy/google/FunctionNamingCheck.cpp
  104           unless(anyOf(isExpansionInSystemHeader(), cxxMethodDecl(),
tools/clang/tools/extra/clang-tidy/google/OverloadedUnaryAndCheck.cpp
   30       cxxMethodDecl(parameterCountIs(0), hasOverloadedOperatorName("&"))
   35   Finder->addMatcher(functionDecl(unless(cxxMethodDecl()), parameterCountIs(1),
tools/clang/tools/extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp
  143       cxxMethodDecl(
  145               cxxMethodDecl(
  152               cxxMethodDecl(
  159               cxxMethodDecl(
  166               cxxMethodDecl(
  187   Finder->addMatcher(cxxMethodDecl(Methods, LocationFilter), this);
  248                     hasMethod(cxxMethodDecl(hasName(ReplacementMethod)))),
tools/clang/tools/extra/clang-tidy/misc/NewDeleteOverloadsCheck.cpp
  145                                 isDeleted(), cxxMethodDecl(isPrivate()))),
tools/clang/tools/extra/clang-tidy/misc/UnconventionalAssignOperatorCheck.cpp
   26   const auto HasGoodReturnType = cxxMethodDecl(returns(lValueReferenceType(
   34       cxxMethodDecl(unless(anyOf(isDeleted(), isPrivate(), isImplicit())),
   38       cxxMethodDecl(IsAssign, hasParameter(0, parmVarDecl(hasType(IsSelf))))
   42       cxxMethodDecl(IsAssign, unless(HasGoodReturnType)).bind("ReturnType"),
   50       cxxMethodDecl(IsSelfAssign,
   56       cxxMethodDecl(IsSelfAssign, anyOf(isConst(), isVirtual())).bind("cv"),
   64   const auto IsGoodAssign = cxxMethodDecl(IsAssign, HasGoodReturnType);
tools/clang/tools/extra/clang-tidy/misc/UniqueptrResetReleaseCheck.cpp
   29               cxxMethodDecl(hasName("reset"),
   35               callee(cxxMethodDecl(
tools/clang/tools/extra/clang-tidy/modernize/LoopConvertCheck.cpp
  131           callee(cxxMethodDecl(anyOf(hasName("begin"), hasName("cbegin")))))
  146       callee(cxxMethodDecl(anyOf(hasName("end"), hasName("cend")))));
  168           recordType(hasDeclaration(cxxRecordDecl(hasMethod(cxxMethodDecl(
  252               hasMethod(cxxMethodDecl(hasName("begin"), isConst())),
  253               hasMethod(cxxMethodDecl(hasName("end"),
  264       callee(cxxMethodDecl(anyOf(hasName("size"), hasName("length")))),
tools/clang/tools/extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
  103           callee(cxxMethodDecl(hasName("reset"))),
tools/clang/tools/extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp
  127                           callee(cxxMethodDecl(ofClass(AutoPtrDecl))),
tools/clang/tools/extra/clang-tidy/modernize/ShrinkToFitCheck.cpp
   47           callee(cxxMethodDecl(hasName("swap"))),
tools/clang/tools/extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp
  156                 callee(cxxMethodDecl(isCopyAssignmentOperator())),
  233       cxxMethodDecl(isDefinition(), isCopyAssignmentOperator(),
tools/clang/tools/extra/clang-tidy/modernize/UseEqualsDeleteCheck.cpp
   31   auto PrivateSpecialFn = cxxMethodDecl(
   35             cxxMethodDecl(
   40       cxxMethodDecl(
   53       cxxMethodDecl(isDeleted(), unless(isPublic())).bind(DeletedNotPublic),
tools/clang/tools/extra/clang-tidy/modernize/UseNodiscardCheck.cpp
  100       cxxMethodDecl(
tools/clang/tools/extra/clang-tidy/modernize/UseNoexceptCheck.cpp
   35           cxxMethodDecl(
tools/clang/tools/extra/clang-tidy/modernize/UseOverrideCheck.cpp
   39         cxxMethodDecl(isOverride(), unless(cxxDestructorDecl())).bind("method"),
   42     Finder->addMatcher(cxxMethodDecl(isOverride()).bind("method"), this);
tools/clang/tools/extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp
  377                                      cxxMethodDecl(isImplicit()))))
tools/clang/tools/extra/clang-tidy/modernize/UseTransparentFunctorsCheck.cpp
   63   Finder->addMatcher(cxxConstructExpr(hasDeclaration(cxxMethodDecl(
tools/clang/tools/extra/clang-tidy/performance/InefficientAlgorithmCheck.cpp
   48                      callee(cxxMethodDecl(hasName("begin"))),
   57                      callee(cxxMethodDecl(hasName("end"))),
tools/clang/tools/extra/clang-tidy/performance/InefficientVectorOperationCheck.cpp
  158       cxxMethodDecl(hasAnyName("push_back", "emplace_back"));
  170         cxxMethodDecl(matchesName("::add_"), unless(isConst()));
tools/clang/tools/extra/clang-tidy/performance/NoexceptMoveConstructorCheck.cpp
   27       cxxMethodDecl(anyOf(cxxConstructorDecl(), hasOverloadedOperatorName("=")),
tools/clang/tools/extra/clang-tidy/performance/UnnecessaryCopyInitialization.cpp
   49       cxxMemberCallExpr(callee(cxxMethodDecl(returns(ConstReference))),
   53                unless(callee(cxxMethodDecl())));
tools/clang/tools/extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp
   89                    unless(cxxMethodDecl(anyOf(isOverride(), isFinal()))),
tools/clang/tools/extra/clang-tidy/readability/AvoidConstParamsInDecls.cpp
   42                    unless(cxxMethodDecl(ofClass(cxxRecordDecl(anyOf(
tools/clang/tools/extra/clang-tidy/readability/ContainerSizeEmptyCheck.cpp
   37               has(cxxMethodDecl(
   42               has(cxxMethodDecl(isConst(), parameterCountIs(0), isPublic(),
   64                         callee(cxxMethodDecl(hasName("size"))), WrongUse,
   65                         unless(hasAncestor(cxxMethodDecl(
   98               cxxMethodDecl(ofClass(equalsBoundNode("container"))))))
tools/clang/tools/extra/clang-tidy/readability/ConvertMemberFunctionsToStatic.cpp
   76       cxxMethodDecl(
tools/clang/tools/extra/clang-tidy/readability/DeletedDefaultCheck.cpp
   28       cxxMethodDecl(anyOf(cxxConstructorDecl().bind("constructor"),
tools/clang/tools/extra/clang-tidy/readability/FunctionSizeCheck.cpp
  150                                   unless(cxxMethodDecl(ofClass(isLambda()))))
tools/clang/tools/extra/clang-tidy/readability/RedundantSmartptrGetCheck.cpp
   27              callee(cxxMethodDecl(
   41       has(cxxMethodDecl(hasName("operator->"),
   43       has(cxxMethodDecl(hasName("operator*"), returns(qualType(references(
tools/clang/tools/extra/clang-tidy/readability/RedundantStringCStrCheck.cpp
   82                        hasDeclaration(cxxMethodDecl(hasName("basic_string")))),
   85           hasDeclaration(cxxMethodDecl(hasName("basic_string"))),
   94                         callee(cxxMethodDecl(hasAnyName("c_str", "data"))))
  126       cxxMemberCallExpr(on(StringExpr), callee(decl(cxxMethodDecl(hasAnyName(
  134                         callee(decl(cxxMethodDecl(hasName("compare")))),
  141                         callee(decl(cxxMethodDecl(hasAnyName(
  151                         callee(decl(cxxMethodDecl(hasName("insert")))),
  162           hasDeclaration(cxxMethodDecl(hasAnyName(
tools/clang/tools/extra/clang-tidy/readability/RedundantStringInitCheck.cpp
   27                        hasDeclaration(cxxMethodDecl(hasName("basic_string")))),
   31                        hasDeclaration(cxxMethodDecl(hasName("basic_string"))),
tools/clang/tools/extra/clang-tidy/readability/StaticAccessedThroughInstanceCheck.cpp
   41       memberExpr(hasDeclaration(anyOf(cxxMethodDecl(isStaticStorageClass()),
tools/clang/tools/extra/clang-tidy/readability/StringCompareCheck.cpp
   30       callee(cxxMethodDecl(hasName("compare"),
tools/clang/tools/extra/clang-tidy/readability/UniqueptrDeleteReleaseCheck.cpp
   34                         callee(cxxMethodDecl(hasName("release")))))))
tools/clang/tools/extra/clang-tidy/utils/DeclRefExprUtils.cpp
   49   auto ConstMethodCallee = callee(cxxMethodDecl(isConst()));
   80   auto ConstMethodCallee = callee(cxxMethodDecl(isConst()));
  162                               callee(cxxMethodDecl(isCopyAssignmentOperator())))
tools/clang/unittests/AST/ASTContextParentMapTest.cpp
   30                      cxxMethodDecl(hasParent(recordDecl(hasName("C"))))));
   57       cxxMethodDecl(hasName("f"),
   62       cxxMethodDecl(hasName("f"),
   67       cxxMethodDecl(
tools/clang/unittests/AST/ASTImporterTest.cpp
 1135       cxxRecordDecl(has(cxxMethodDecl(hasDescendant(
 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"))));
 2145   auto BFDefP = cxxMethodDecl(
 2147   auto DFDefP = cxxMethodDecl(
 2149   auto FDefAllP = cxxMethodDecl(hasName("f"), isDefinition());
 2180       cxxMethodDecl(hasName("f"), hasParent(cxxRecordDecl(hasName("B"))));
 2181   auto BFDefP = cxxMethodDecl(
 2183   auto DFP = cxxMethodDecl(hasName("f"), hasParent(cxxRecordDecl(hasName("D"))),
 2203       ToTU, cxxMethodDecl(hasName("f"), isDefinition()));
 2233       cxxMethodDecl(hasName("f"), hasParent(cxxRecordDecl(hasName("B"))));
 2234   auto BFDefP = cxxMethodDecl(
 2237       cxxMethodDecl(hasName("f"), hasParent(cxxRecordDecl(hasName("D"))));
 2238   auto DFDefP = cxxMethodDecl(
 2267       ToTU, cxxMethodDecl(hasName("f"), isDefinition()));
 2270       ToTU, cxxMethodDecl(hasName("f"), isDefinition()));
 3065   testImportOf(cxxMethodDecl(isCopyAssignmentOperator()));
 3069   testImportOf(cxxMethodDecl(isMoveAssignmentOperator()));
 3097   testNoImportOf(cxxMethodDecl(hasName("f")), Code);
 4995       FromTU, cxxMethodDecl(hasName("f")));
 5005       FromTU, cxxMethodDecl(hasName("ok")));
tools/clang/unittests/AST/DeclPrinterTest.cpp
  639     cxxMethodDecl(ofClass(hasName("A"))).bind("id"),
  648     cxxMethodDecl(ofClass(hasName("A"))).bind("id"),
  658     cxxMethodDecl(ofClass(hasName("A"))).bind("id"),
  668     cxxMethodDecl(ofClass(hasName("Z"))).bind("id"),
  678     cxxMethodDecl(ofClass(hasName("Z"))).bind("id"),
  687     cxxMethodDecl(ofClass(hasName("Z"))).bind("id"),
  697     cxxMethodDecl(ofClass(hasName("Z"))).bind("id"),
  706     cxxMethodDecl(ofClass(hasName("Z"))).bind("id"),
  733       cxxMethodDecl(ofClass(hasName("Z"))).bind("id"),
  756       cxxMethodDecl(ofClass(hasName("Z"))).bind("id"),
tools/clang/unittests/AST/StructuralEquivalenceTest.cpp
  438       cxxMethodDecl(hasName("foo")));
  483       cxxMethodDecl(hasName("foo")));
tools/clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
  682   const auto IsLambda = cxxMethodDecl(ofClass(cxxRecordDecl(isLambda())));
  704     callExpr(callee(cxxMethodDecl(hasName("x")))).bind("x");
  746             cxxMethodDecl(hasParameter(0, hasType(asString("int"))))));
 1128                       cxxMethodDecl(isFinal())));
 1131     notMatches("class X { virtual void f(); };", cxxMethodDecl(isFinal())));
 1136                       cxxMethodDecl(isVirtual(), hasName("::X::f"))));
 1137   EXPECT_TRUE(notMatches("class X { int f(); };", cxxMethodDecl(isVirtual())));
 1143                       cxxMethodDecl(isVirtualAsWritten(), hasName("::A::f"))));
 1147                cxxMethodDecl(isVirtualAsWritten(), hasName("::B::f"))));
 1152                       cxxMethodDecl(isPure(), hasName("::X::f"))));
 1153   EXPECT_TRUE(notMatches("class X { int f(); };", cxxMethodDecl(isPure())));
 1158                       cxxMethodDecl(isCopyAssignmentOperator())));
 1160                       cxxMethodDecl(isCopyAssignmentOperator())));
 1162                       cxxMethodDecl(isCopyAssignmentOperator())));
 1164                       cxxMethodDecl(isCopyAssignmentOperator())));
 1166                       cxxMethodDecl(isCopyAssignmentOperator())));
 1168                          cxxMethodDecl(isCopyAssignmentOperator())));
 1173                          cxxMethodDecl(isMoveAssignmentOperator())));
 1175                       cxxMethodDecl(isMoveAssignmentOperator())));
 1177                       cxxMethodDecl(isMoveAssignmentOperator())));
 1179                       cxxMethodDecl(isMoveAssignmentOperator())));
 1181                       cxxMethodDecl(isMoveAssignmentOperator())));
 1183                          cxxMethodDecl(isMoveAssignmentOperator())));
 1188     matches("struct A { void foo() const; };", cxxMethodDecl(isConst())));
 1190     notMatches("struct A { void foo(); };", cxxMethodDecl(isConst())));
 1196                       cxxMethodDecl(isOverride(), hasName("::Y::f"))));
 1199                          cxxMethodDecl(isOverride(), hasName("::X::f"))));
 1202                          cxxMethodDecl(isOverride())));
 1204                          cxxMethodDecl(isOverride())));
 1207             cxxMethodDecl(isOverride(), hasName("::Y::f"))));
 1275                       cxxMethodDecl(isImplicit(), hasName("operator="))));
 1522     cxxMethodDecl(hasName("a"), isDefinition());
 2144                       cxxMethodDecl(returns(booleanType()))));
 2146                          cxxMethodDecl(returns(booleanType()))));
 2151                       cxxMethodDecl(returns(voidType()))));
 2156                       cxxMethodDecl(returns(realFloatingPointType()))));
 2158                          cxxMethodDecl(returns(realFloatingPointType()))));
 2160                       cxxMethodDecl(returns(realFloatingPointType()))));
 2363       callee(cxxMethodDecl(hasName("data"))),
 2367         callee(cxxMethodDecl(anyOf(hasName("size"), hasName("length")))),
 2379       callee(cxxMethodDecl(hasName("data"))),
 2383         callee(cxxMethodDecl(anyOf(hasName("size"), hasName("length")))),
tools/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp
  239     callExpr(hasDeclaration(cxxMethodDecl(hasName("x"))));
tools/clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
  371   StatementMatcher CallMethodX = callExpr(callee(cxxMethodDecl(hasName("x"))));
  732                       cxxMethodDecl(hasParameter(0, varDecl()))));
  734                          cxxMethodDecl(hasParameter(0, hasName("x")))));
  743                          cxxMethodDecl(hasParameter(42, varDecl()))));
  749     cxxMethodDecl(hasParameter(0, hasType(recordDecl(hasName("X")))))));
  752     cxxMethodDecl(hasParameter(0, hasType(recordDecl(hasName("X")))))));
  754                       cxxMethodDecl(hasParameter(
  757                       cxxMethodDecl(hasParameter(
  764     cxxMethodDecl(hasAnyParameter(hasType(recordDecl(hasName("X")))))));
  767     cxxMethodDecl(hasAnyParameter(hasType(recordDecl(hasName("X")))))));
  787     cxxMethodDecl(hasAnyParameter(hasType(recordDecl(hasName("X")))))));
  792                          cxxMethodDecl(hasAnyParameter(
  798                       cxxMethodDecl(hasAnyParameter(hasName("x")))));
  800                          cxxMethodDecl(hasAnyParameter(hasName("x")))));
 1301   StatementMatcher Constructor = cxxConstructExpr(hasDeclaration(cxxMethodDecl(
 1319     callExpr(callee(cxxMethodDecl(hasName("x"))))));
 1331       callee(cxxMethodDecl(hasName("x"))))))));
 1424     cxxMethodDecl(ofClass(hasName("X"))), true, "-std=gnu++98"));
 1427                       cxxMethodDecl(ofClass(hasName("X")))));
 1433     cxxMethodDecl(ofClass(hasName("X"))), true, "-std=gnu++98"));
 2562     return cxxMethodDecl(ofClass(hasName(ClassName)), isVirtual(),
 2563                          forEachOverridden(cxxMethodDecl().bind("overridden")))
tools/clang/unittests/Tooling/TransformerTest.cpp
  149                                   callee(cxxMethodDecl(hasName("c_str")))))),
  173                         unless(callee(cxxMethodDecl(hasName("GetProto"))))),
  466                         unless(callee(cxxMethodDecl(hasName("GetProto"))))),