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

Declarations

tools/clang/include/clang/ASTMatchers/ASTMatchers.h
 1182     functionDecl;

References

tools/clang/include/clang/ASTMatchers/ASTMatchers.h
 4027                      callExpr(callee(functionDecl(
 5276                                     functionDecl(isTemplateInstantiation())));
 5297                              functionDecl(isTemplateInstantiation())))));
tools/clang/lib/ASTMatchers/Dynamic/Registry.cpp
  229   REGISTER_MATCHER(functionDecl);
tools/clang/lib/Analysis/ExprMutationAnalyzer.cpp
  389   const auto FuncDecl = hasDeclaration(functionDecl().bind("func"));
tools/clang/lib/StaticAnalyzer/Checkers/GCDAntipatternChecker.cpp
   56     -> decltype(callee(functionDecl())) {
   57   return callee(functionDecl(hasName(FunctionName)));
tools/clang/lib/StaticAnalyzer/Checkers/OSObjectCStyleCast.cpp
   68   auto DynamicCastM = callExpr(callee(functionDecl(hasName("safeMetaCast"))));
tools/clang/lib/StaticAnalyzer/Checkers/ObjCAutoreleaseWriteChecker.cpp
  104     -> decltype(callee(functionDecl())) {
  105   return callee(functionDecl(hasAnyName(toRefs(FunctionNames))));
  198       functionDecl(HasParamAndWritesInMarkedFuncM),
tools/clang/lib/StaticAnalyzer/Checkers/PointerSortingChecker.cpp
   57 auto callsName(const char *FunctionName) -> decltype(callee(functionDecl())) {
   58   return callee(functionDecl(hasName(FunctionName)));
tools/clang/lib/StaticAnalyzer/Checkers/RunLoopAutoreleaseLeakChecker.cpp
  143       callExpr(callee(functionDecl(hasName("xpc_main")))).bind(RunLoopRunBind);
  182   DeclarationMatcher GroupM = functionDecl(
tools/clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp
  543   auto AssertLikeM = callExpr(callee(functionDecl(
  553   auto NoReturnFuncM = callExpr(callee(functionDecl(isNoReturn())));
tools/clang/tools/extra/clang-change-namespace/ChangeNamespace.cpp
  457                            hasAncestor(functionDecl(isDefaulted())))),
  481                        hasAncestor(functionDecl(isDefaulted())),
  503       functionDecl(unless(anyOf(cxxMethodDecl(), IsInMovedNs,
tools/clang/tools/extra/clang-include-fixer/find-all-symbols/FindAllSymbols.cpp
  120                  functionDecl(isExplicitTemplateSpecialization()))));
  167   auto Functions = functionDecl(CommonFilter, unless(hasParent(friendDecl())),
  211                   to(functionDecl(hasParent(
tools/clang/tools/extra/clang-move/Move.cpp
  584       namedDecl(notInMacro(), anyOf(functionDecl(IsOldCCHelper),
  633   Finder->addMatcher(functionDecl(InOldFiles, *HasAnySymbolNames, TopLevelDecl)
tools/clang/tools/extra/clang-tidy/abseil/DurationAdditionCheck.cpp
   25                          callExpr(callee(functionDecl(TimeConversionFunction())
tools/clang/tools/extra/clang-tidy/abseil/DurationComparisonCheck.cpp
   22   auto Matcher = expr(comparisonOperatorWithCallee(functionDecl(
   23                           functionDecl(DurationConversionFunction())
tools/clang/tools/extra/clang-tidy/abseil/DurationConversionCastCheck.cpp
   23       callee(functionDecl(DurationConversionFunction()).bind("func_decl")),
tools/clang/tools/extra/clang-tidy/abseil/DurationFactoryFloatCheck.cpp
   32       callExpr(callee(functionDecl(DurationFactoryFunction())),
tools/clang/tools/extra/clang-tidy/abseil/DurationFactoryScaleCheck.cpp
  121           callee(functionDecl(DurationFactoryFunction()).bind("call_decl")),
tools/clang/tools/extra/clang-tidy/abseil/DurationRewriter.cpp
   77           match(callExpr(callee(functionDecl(hasAnyName(
   94           "e", match(callExpr(callee(functionDecl(hasName(InverseFunction))),
tools/clang/tools/extra/clang-tidy/abseil/DurationRewriter.h
  102   return functionDecl(
  114   return functionDecl(hasAnyName("::absl::Nanoseconds", "::absl::Microseconds",
  122   return functionDecl(hasAnyName(
tools/clang/tools/extra/clang-tidy/abseil/DurationSubtractionCheck.cpp
   25           hasLHS(callExpr(callee(functionDecl(DurationConversionFunction())
tools/clang/tools/extra/clang-tidy/abseil/DurationUnnecessaryConversionCheck.cpp
   34         callExpr(callee(functionDecl(hasName(DurationFactory))),
   40         callee(functionDecl(hasAnyName(FloatConversion, IntegerConversion))),
   52         callee(functionDecl(hasName("::absl::FDivDuration"))),
   56         callExpr(callee(functionDecl(hasName(DurationFactory))),
tools/clang/tools/extra/clang-tidy/abseil/FasterStrsplitDelimiterCheck.cpp
   84   Finder->addMatcher(callExpr(callee(functionDecl(hasName("::absl::StrSplit"))),
   95           callee(functionDecl(hasName("::absl::MaxSplits"))),
tools/clang/tools/extra/clang-tidy/abseil/RedundantStrcatCallsCheck.cpp
   31       callExpr(callee(functionDecl(hasName("::absl::StrCat"))));
   33       callExpr(callee(functionDecl(hasName("::absl::StrAppend"))));
   37       callee(functionDecl(hasAnyName("::absl::StrCat", "::absl::StrAppend"))));
   68       has(callExpr(callee(functionDecl(*Strcat))).bind("StrCat")));
tools/clang/tools/extra/clang-tidy/abseil/StrCatAppendCheck.cpp
   47   const auto StrCat = functionDecl(hasName("::absl::StrCat"));
tools/clang/tools/extra/clang-tidy/abseil/TimeComparisonCheck.cpp
   24       expr(comparisonOperatorWithCallee(functionDecl(
   25                functionDecl(TimeConversionFunction()).bind("function_decl"))))
tools/clang/tools/extra/clang-tidy/abseil/TimeSubtractionCheck.cpp
  102         functionDecl(hasName((llvm::Twine("::absl::") + TimeInverse).str()))
  112             callee(functionDecl(hasName(getDurationFactoryForScale(*Scale)))),
  163                          callExpr(callee(functionDecl(hasName(
tools/clang/tools/extra/clang-tidy/abseil/UpgradeDurationConversionsCheck.cpp
   40           callee(functionDecl(
   64       callExpr(callee(functionDecl(
   78       callExpr(callee(functionDecl(
  109               callee(functionDecl(DurationFactoryFunction(),
tools/clang/tools/extra/clang-tidy/android/CloexecAccept4Check.cpp
   26                        functionDecl(returns(isInteger()), hasName("accept4"),
tools/clang/tools/extra/clang-tidy/android/CloexecAcceptCheck.cpp
   25                        functionDecl(returns(isInteger()), hasName("accept"),
tools/clang/tools/extra/clang-tidy/android/CloexecCheck.cpp
   48           callee(functionDecl(isExternC(), Function).bind(FuncDeclBindingStr)))
tools/clang/tools/extra/clang-tidy/android/CloexecCreatCheck.cpp
   23                        functionDecl(isExternC(), returns(isInteger()),
tools/clang/tools/extra/clang-tidy/android/CloexecDupCheck.cpp
   21                        functionDecl(returns(isInteger()), hasName("dup"),
tools/clang/tools/extra/clang-tidy/android/CloexecEpollCreate1Check.cpp
   22       Finder, functionDecl(returns(isInteger()), hasName("epoll_create1"),
tools/clang/tools/extra/clang-tidy/android/CloexecEpollCreateCheck.cpp
   21       Finder, functionDecl(returns(isInteger()), hasName("epoll_create"),
tools/clang/tools/extra/clang-tidy/android/CloexecFopenCheck.cpp
   24                        functionDecl(isExternC(), returns(asString("FILE *")),
tools/clang/tools/extra/clang-tidy/android/CloexecInotifyInit1Check.cpp
   22       Finder, functionDecl(returns(isInteger()), hasName("inotify_init1"),
tools/clang/tools/extra/clang-tidy/android/CloexecInotifyInitCheck.cpp
   21       Finder, functionDecl(returns(isInteger()), hasName("inotify_init")));
tools/clang/tools/extra/clang-tidy/android/CloexecMemfdCreateCheck.cpp
   20       Finder, functionDecl(returns(isInteger()), hasName("memfd_create"),
tools/clang/tools/extra/clang-tidy/android/CloexecOpenCheck.cpp
   22                        functionDecl(isExternC(), returns(isInteger()),
   27                        functionDecl(isExternC(), returns(isInteger()),
tools/clang/tools/extra/clang-tidy/android/CloexecPipe2Check.cpp
   22                        functionDecl(returns(isInteger()), hasName("pipe2"),
tools/clang/tools/extra/clang-tidy/android/CloexecPipeCheck.cpp
   21                        functionDecl(returns(isInteger()), hasName("pipe"),
tools/clang/tools/extra/clang-tidy/android/CloexecSocketCheck.cpp
   21                        functionDecl(isExternC(), returns(isInteger()),
tools/clang/tools/extra/clang-tidy/boost/UseToStringCheck.cpp
   30           hasDeclaration(functionDecl(
tools/clang/tools/extra/clang-tidy/bugprone/ArgumentCommentCheck.cpp
   56                unless(hasDeclaration(functionDecl(
tools/clang/tools/extra/clang-tidy/bugprone/DanglingHandleCheck.cpp
   76               callee(functionDecl(hasAnyName("assign", "push_back", "resize"))),
   80           cxxMemberCallExpr(callee(functionDecl(hasName("insert"))),
tools/clang/tools/extra/clang-tidy/bugprone/ExceptionEscapeCheck.cpp
   59       functionDecl(anyOf(isNoThrow(), cxxDestructorDecl(),
tools/clang/tools/extra/clang-tidy/bugprone/FoldInitTypeCheck.cpp
   42       callExpr(callee(functionDecl(
   50       callExpr(callee(functionDecl(hasName("::std::inner_product"),
   59       callExpr(callee(functionDecl(hasName("::std::reduce"),
   67       callExpr(callee(functionDecl(hasName("::std::inner_product"),
tools/clang/tools/extra/clang-tidy/bugprone/ForwardDeclarationNamespaceCheck.cpp
   32                  functionDecl(isExplicitTemplateSpecialization()))));
tools/clang/tools/extra/clang-tidy/bugprone/InaccurateEraseCheck.cpp
   28           callee(functionDecl(hasAnyName("remove", "remove_if", "unique"))),
tools/clang/tools/extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp
   24                     callExpr(Internal, callee(functionDecl(isNoReturn())))));
  158           expr(forFunction(functionDecl().bind("func"))).bind("condition")),
tools/clang/tools/extra/clang-tidy/bugprone/MisplacedOperatorInStrlenInAllocCheck.cpp
   21   const auto StrLenFunc = functionDecl(anyOf(
   45       functionDecl(anyOf(hasName("::malloc"), hasName("std::malloc"),
   48       functionDecl(anyOf(hasName("::calloc"), hasName("std::calloc"),
tools/clang/tools/extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp
  579       callExpr(callee(functionDecl(hasAnyName("::strlen", "::wcslen"))))
  603   auto CallExprReturnWithoutInc = ignoringImpCasts(callExpr(callee(functionDecl(
  623       callee(functionDecl(
  727     return allOf(callee(functionDecl(
tools/clang/tools/extra/clang-tidy/bugprone/PosixReturnCheck.cpp
   34           hasLHS(callExpr(callee(functionDecl(
   43           hasLHS(callExpr(callee(functionDecl(
   53           hasLHS(callExpr(callee(functionDecl(
tools/clang/tools/extra/clang-tidy/bugprone/StringIntegerAssignmentCheck.cpp
   36                        unless(callExpr(callee(functionDecl(
tools/clang/tools/extra/clang-tidy/bugprone/SuspiciousMemsetUsageCheck.cpp
   27           callee(functionDecl(hasName("::memset"))),
   39   Finder->addMatcher(callExpr(callee(functionDecl(hasName("::memset"))),
   46       callExpr(callee(functionDecl(hasName("::memset"))),
tools/clang/tools/extra/clang-tidy/bugprone/SuspiciousStringCompareCheck.cpp
  100       functionDecl(hasAnyName(std::vector<StringRef>(FunctionNames.begin(),
tools/clang/tools/extra/clang-tidy/bugprone/UndefinedMemoryManipulationCheck.cpp
   33   Finder->addMatcher(callExpr(callee(functionDecl(hasAnyName(
   42       callExpr(callee(functionDecl(hasAnyName("::memcpy", "::memmove"))),
tools/clang/tools/extra/clang-tidy/bugprone/UnusedReturnValueCheck.cpp
   55       callExpr(callee(functionDecl(
tools/clang/tools/extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp
   80                    to(functionDecl(ast_matchers::isTemplateInstantiation())))));
  326                         unless(callee(functionDecl(hasName("::std::move")))))))
  381       callExpr(callee(functionDecl(hasName("::std::move"))), argumentCountIs(1),
  384                      hasAncestor(functionDecl().bind("containing-func"))),
tools/clang/tools/extra/clang-tidy/cert/CommandProcessorCheck.cpp
   22           callee(functionDecl(anyOf(hasName("::system"), hasName("::popen"),
   28           unless(callExpr(callee(functionDecl(hasName("::system"))),
tools/clang/tools/extra/clang-tidy/cert/DontModifyStdNamespaceCheck.cpp
   27                         functionDecl(isExplicitTemplateSpecialization()),
tools/clang/tools/extra/clang-tidy/cert/LimitedRandomnessCheck.cpp
   20   Finder->addMatcher(callExpr(callee(functionDecl(namedDecl(hasName("::rand")),
tools/clang/tools/extra/clang-tidy/cert/PostfixOperatorCheck.cpp
   24   Finder->addMatcher(functionDecl(anyOf(hasOverloadedOperatorName("++"),
tools/clang/tools/extra/clang-tidy/cert/ProperlySeededRandomGeneratorCheck.cpp
   73       callExpr(callee(functionDecl(hasAnyName("::srand", "::std::srand"))))
tools/clang/tools/extra/clang-tidy/cert/SetLongJmpCheck.cpp
   67       callExpr(callee(functionDecl(hasAnyName("setjmp", "longjmp"))))
tools/clang/tools/extra/clang-tidy/cert/StaticObjectExceptionCheck.cpp
   29                            hasAncestor(functionDecl()))),
   33                         functionDecl(unless(isNoThrow())).bind("func")))),
   35                         functionDecl(unless(isNoThrow())).bind("func"))))))
tools/clang/tools/extra/clang-tidy/cert/StrToNumCheck.cpp
   27           callee(functionDecl(anyOf(
   28               functionDecl(hasAnyName("::atoi", "::atof", "::atol", "::atoll"))
   30               functionDecl(hasAnyName("::scanf", "::sscanf", "::fscanf",
tools/clang/tools/extra/clang-tidy/cert/VariadicFunctionDefCheck.cpp
   26       functionDecl(isDefinition(), isVariadic(), unless(isExternC()))
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp
   35   const auto IsCeilFloorCallExpr = expr(callExpr(callee(functionDecl(
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/NoMallocCheck.cpp
   45   Finder->addMatcher(callExpr(callee(functionDecl(hasAnyListedName(AllocList))))
   51       callExpr(callee(functionDecl(hasAnyListedName(ReallocList))))
   57       callExpr(callee(functionDecl(hasAnyListedName(DeallocList))))
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/OwningMemoryCheck.cpp
   55       callExpr(callee(functionDecl(LegacyCreatorFunctions)));
   63   const auto LegacyOwnerConsumers = functionDecl(LegacyConsumerFunctions);
   68                 functionDecl(returns(qualType(hasDeclaration(OwnerDecl)))))),
  160       functionDecl(hasDescendant(returnStmt(hasReturnValue(ConsideredOwner))
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/ProTypeVarargCheck.cpp
   28       callExpr(callee(functionDecl(isVariadic()))).bind("callvararg"), this);
tools/clang/tools/extra/clang-tidy/darwin/AvoidSpinlockCheck.cpp
   21       callExpr(callee((functionDecl(hasAnyName(
tools/clang/tools/extra/clang-tidy/fuchsia/OverloadedOperatorCheck.cpp
   31   Finder->addMatcher(functionDecl(isFuchsiaOverloadedOperator()).bind("decl"),
tools/clang/tools/extra/clang-tidy/fuchsia/TrailingReturnCheck.cpp
   36       functionDecl(hasTrailingReturn(),
tools/clang/tools/extra/clang-tidy/google/ExplicitMakePairCheck.cpp
   40                                to(functionDecl(hasName("::std::make_pair"))))
tools/clang/tools/extra/clang-tidy/google/FunctionNamingCheck.cpp
  103       functionDecl(
tools/clang/tools/extra/clang-tidy/google/IntegerTypesCheck.cpp
   68                                  callee(functionDecl(hasAttr(attr::Format)))))))
tools/clang/tools/extra/clang-tidy/google/OverloadedUnaryAndCheck.cpp
   35   Finder->addMatcher(functionDecl(unless(cxxMethodDecl()), parameterCountIs(1),
tools/clang/tools/extra/clang-tidy/linuxkernel/MustCheckErrsCheck.cpp
   21       functionDecl(hasAnyName("ERR_PTR", "PTR_ERR", "IS_ERR", "IS_ERR_OR_NULL",
   29   auto ReturnsErrFn = functionDecl(hasDescendant(ReturnToCheck));
tools/clang/tools/extra/clang-tidy/misc/DefinitionsInHeadersCheck.cpp
   55       anyOf(functionDecl(isDefinition(), unless(isDeleted())),
tools/clang/tools/extra/clang-tidy/misc/NewDeleteOverloadsCheck.cpp
  144       functionDecl(unless(anyOf(isImplicit(), isPlacementOverload(),
tools/clang/tools/extra/clang-tidy/misc/StaticAssertCheck.cpp
   53       callExpr(hasDeclaration(functionDecl(unless(isConstexpr()))));
   64                 hasDeclaration(functionDecl(hasName("__builtin_expect"))),
tools/clang/tools/extra/clang-tidy/misc/UnusedParametersCheck.cpp
   33       functionDecl(isDefinition(), hasBody(stmt()), hasAnyParameter(decl()))
tools/clang/tools/extra/clang-tidy/misc/UnusedUsingDeclsCheck.cpp
   63       callExpr(hasDeclaration(functionDecl(
tools/clang/tools/extra/clang-tidy/modernize/AvoidBindCheck.cpp
  126           hasArgument(0, declRefExpr(to(functionDecl().bind("f"))).bind("ref")))
tools/clang/tools/extra/clang-tidy/modernize/AvoidCArraysCheck.cpp
   56                            hasAncestor(functionDecl(isExternC())))))
tools/clang/tools/extra/clang-tidy/modernize/RedundantVoidArgCheck.cpp
   50   Finder->addMatcher(functionDecl(parameterCountIs(0), unless(isImplicit()),
tools/clang/tools/extra/clang-tidy/modernize/ReplaceRandomShuffleCheck.cpp
   39                hasDeclaration(functionDecl(hasName("::std::random_shuffle"))),
tools/clang/tools/extra/clang-tidy/modernize/ReturnBracedInitListCheck.cpp
   38       functionDecl(isDefinition(), // Declarations don't have return statements.
tools/clang/tools/extra/clang-tidy/modernize/UseAutoCheck.cpp
  294       callee(functionDecl(TemplateArg,
tools/clang/tools/extra/clang-tidy/modernize/UseEmplaceCheck.cpp
   55       hasDeclaration(functionDecl(hasName("push_back"))),
  100               to(functionDecl(hasAnyName(SmallVector<StringRef, 2>(
tools/clang/tools/extra/clang-tidy/modernize/UseNoexceptCheck.cpp
   34       functionDecl(
   44       functionDecl(
tools/clang/tools/extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp
  375   auto F = functionDecl(unless(anyOf(hasTrailingReturn(), returns(voidType()),
tools/clang/tools/extra/clang-tidy/modernize/UseUncaughtExceptionsCheck.cpp
   33       declRefExpr(to(functionDecl(hasName(MatchText))), unless(callExpr()))
   38   Finder->addMatcher(callExpr(hasDeclaration(functionDecl(hasName(MatchText))),
   45                               hasDeclaration(functionDecl(hasName(MatchText))))
tools/clang/tools/extra/clang-tidy/performance/FasterStringFindCheck.cpp
   73           callee(functionDecl(StringFindFunctions).bind("func")),
tools/clang/tools/extra/clang-tidy/performance/InefficientAlgorithmCheck.cpp
   45           callee(functionDecl(Algorithms)),
tools/clang/tools/extra/clang-tidy/performance/MoveConstArgCheck.cpp
   47       callExpr(callee(functionDecl(hasName("::std::move"))), argumentCountIs(1),
tools/clang/tools/extra/clang-tidy/performance/TypePromotionInMathFnCheck.cpp
   73       callExpr(callee(functionDecl(OneDoubleArgFns, parameterCountIs(1),
   84       callExpr(callee(functionDecl(TwoDoubleArgFns, parameterCountIs(2),
   93       callExpr(callee(functionDecl(hasName("::fma"), parameterCountIs(3),
  104       callExpr(callee(functionDecl(
  116       callExpr(callee(functionDecl(hasName("::nexttoward"), parameterCountIs(2),
  127           callee(functionDecl(
  138       callExpr(callee(functionDecl(hasName("::scalbln"), parameterCountIs(2),
  147       callExpr(callee(functionDecl(hasName("::scalbn"), parameterCountIs(2),
tools/clang/tools/extra/clang-tidy/performance/UnnecessaryCopyInitialization.cpp
   52       callExpr(callee(functionDecl(returns(ConstReference))),
tools/clang/tools/extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp
   36   auto Matches = match(declRefExpr(to(functionDecl(equalsNode(&Function))),
   88       functionDecl(hasBody(stmt()), isDefinition(), unless(isImplicit()),
tools/clang/tools/extra/clang-tidy/portability/SIMDIntrinsicsCheck.cpp
  102   Finder->addMatcher(callExpr(callee(functionDecl(
tools/clang/tools/extra/clang-tidy/readability/AvoidConstParamsInDecls.cpp
   35       functionDecl(unless(isDefinition()),
tools/clang/tools/extra/clang-tidy/readability/ConstReturnTypeCheck.cpp
  100       functionDecl(returns(isConstQualified()), isDefinition()).bind("func"),
tools/clang/tools/extra/clang-tidy/readability/FunctionSizeCheck.cpp
  149   Finder->addMatcher(functionDecl(unless(isInstantiated()),
tools/clang/tools/extra/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp
  300   Finder->addMatcher(functionDecl(unless(isImplicit()), hasOtherDeclarations())
tools/clang/tools/extra/clang-tidy/readability/NamedParameterCheck.cpp
   21   Finder->addMatcher(functionDecl(unless(isInstantiated())).bind("decl"), this);
tools/clang/tools/extra/clang-tidy/readability/RedundantControlFlowCheck.cpp
   35       functionDecl(
tools/clang/tools/extra/clang-tidy/readability/RedundantDeclarationCheck.cpp
   32                       functionDecl(unless(anyOf(
tools/clang/tools/extra/clang-tidy/readability/StaticDefinitionInAnonymousNamespaceCheck.cpp
   23       namedDecl(anyOf(functionDecl(isDefinition(), isStaticStorageClass()),
tools/clang/tools/extra/clang-tidy/utils/ASTUtils.cpp
   23       "function", match(stmt(hasAncestor(functionDecl().bind("function"))),
tools/clang/tools/extra/clang-tidy/utils/NamespaceAliaser.cpp
   47       match(functionDecl(hasBody(compoundStmt(has(declStmt(
   62         !match(functionDecl(hasAncestor(decl(has(ConflictMatcher)))), *Function,
tools/clang/tools/extra/unittests/clang-query/QueryEngineTest.cpp
   51   DynTypedMatcher FnMatcher = functionDecl();
   52   DynTypedMatcher FooMatcher = functionDecl(hasName("foo1"));
tools/clang/tools/extra/unittests/clang-tidy/TransformerClangTidyCheckTest.cpp
  125   return tooling::makeRule(clang::ast_matchers::functionDecl(),
  150   return tooling::makeRule(clang::ast_matchers::functionDecl(),
  178       tooling::makeRule(callExpr(callee(functionDecl(hasName("f")))),
tools/clang/unittests/AST/ASTContextParentMapTest.cpp
   43                      typeLoc(hasParent(typeLoc(hasParent(functionDecl()))))));
  112       varDecl(hasName("y"), hasAncestor(functionDecl(
tools/clang/unittests/AST/ASTImporterGenericRedeclTest.cpp
   25     return functionDecl(hasName("X"), unless(isImplicit()));
   89     return functionDecl(hasName("X"), isExplicitTemplateSpecialization());
tools/clang/unittests/AST/ASTImporterODRStrategiesTest.cpp
   38     return functionDecl(hasName("X"), unless(isImplicit()));
  198     return functionDecl(hasName("X"), isExplicitTemplateSpecialization(),
tools/clang/unittests/AST/ASTImporterTest.cpp
  256   auto Pattern = functionDecl(hasName("f"));
  266   auto Pattern = functionDecl(hasName("f"));
  280   auto Pattern = functionDecl(hasName("f"));
  339   auto Pattern = functionDecl(hasName("shouldNotBeImported"));
  356   auto Pattern = functionDecl(hasName("shouldNotBeImported"));
  367     auto Pattern = functionDecl(hasName("f"));
  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(
  569       functionDecl(hasDescendant(
  582       functionDecl(
  617       functionDecl(hasDescendant(
  626     functionDecl(hasDescendant(
  647       functionDecl(hasDescendant(
  661       functionDecl(hasDescendant(
  685       functionDecl(hasDescendant(
  707       functionDecl(hasDescendant(
  723       functionDecl(hasDescendant(
  750       functionDecl(hasDescendant(
  760       functionDecl(hasDescendant(
  771       functionDecl(hasDescendant(typedefDecl(has(atomicType())))));
  814       functionDecl(
  829       functionDecl(
  845       functionDecl(hasDescendant(
  909       functionDecl(hasDescendant(typeTraitExpr(hasType(asString("int"))))));
  923       functionDecl(
  939           functionDecl(hasDescendant(
  951              functionDecl(hasBody(compoundStmt(
  976       FromTU, functionDecl(hasName("declToImport")));
  988       FromTU, functionDecl(hasName("declToImport")));
  993       To, functionDecl(hasName("declToImport"),
 1005       FromTU, functionDecl(hasName("declToImport")));
 1023       functionDecl(hasDescendant(
 1033       functionDecl(hasDescendant(usingDecl())));
 1105           unless(has(functionDecl(hasName("declToImport"))))))));
 1154       FromTU, functionDecl(hasName("f")));
 1303   auto Matcher = functionDecl(hasName("declToImport"),
 1585   auto Matcher = functionDecl();
 1598   Decl *From = LastDeclMatcher<Decl>{}.match(FromTU, functionDecl());
 1648         FromTU, functionDecl(hasName("f")));
 1751   auto FromD = FirstDeclMatcher<FunctionDecl>().match(FromTU, functionDecl());
 1778   auto FromD = FirstDeclMatcher<FunctionDecl>().match(FromTU, functionDecl());
 1934         FromTU, functionDecl(hasName("f")));
 1952         FromTU, functionDecl(hasName("f")));
 1981         FromTU, functionDecl(hasName("f")));
 2010   auto Pattern = functionDecl(hasName("f"));
 2028   auto Pattern = functionDecl(hasName("f"));
 2092             }).match(ToTU, functionDecl()));
 2095   auto *FromD = FirstDeclMatcher<FunctionDecl>().match(FromTU, functionDecl());
 2102             }).match(ToTU, functionDecl()));
 2240   auto FooDef = functionDecl(hasName("foo"));
 2313   auto Pattern = functionDecl(hasName("f"));
 2332         FromTU, functionDecl(hasName("g0")));
 2341         FromTU, functionDecl(hasName("g1")));
 2346   ASSERT_EQ(DeclCounter<FunctionDecl>().match(ToTU, functionDecl(hasName("f"))),
 2359       FromTU, functionDecl(hasName("foo")));
 2385       FromTU, functionDecl(hasName("f")));
 2389       ToD, functionDecl(hasName("f"), hasDescendant(declRefExpr()))));
 2411       FromTU, functionDecl(hasName("g")));
 2417                 functionDecl(hasName("f"), hasDescendant(declRefExpr()))))));
 2474       FromTU, functionDecl(hasName("foo")));
 2514       FromTU, functionDecl(hasOverloadedOperatorName("<")));
 2522   auto Pattern = functionDecl(hasName("f"));
 2541   auto Pattern = functionDecl(hasName("f"));
 2558   auto Pattern = functionDecl(hasName("f"));
 2577   auto Pattern = functionDecl(hasName("f"));
 2594   auto Pattern = functionDecl(hasName("f"));
 2623   auto Pattern = functionDecl(hasName("f"));
 2641       ToTU, functionDecl(unless(hasParent(friendDecl()))));
 2651   auto Pattern = functionDecl(hasName("f"));
 2675   auto FunctionPattern = functionDecl(hasName("f"));
 2709   auto FunctionPattern = functionDecl(hasName("f"));
 2759   auto FunctionPattern = functionDecl(hasName("f"));
 2803   auto Pattern = functionDecl(hasName("f"));
 2852       FromTU, functionDecl(hasName("f")));
 2910   ImportAction ImportFoo{"foo.c", "main.c", functionDecl(hasName("foo"))},
 2911       ImportMoo{"moo.c", "main.c", functionDecl(hasName("moo"))};
 2947              functionTemplateDecl(has(functionDecl(has(compoundStmt(
 2958              functionTemplateDecl(has(functionDecl(has(compoundStmt(
 2984              functionTemplateDecl(has(functionDecl(has(
 3190         FromTU, functionDecl(hasName("x"), isDefinition()));
 3198         FromTU, functionDecl(hasName("x"), isDefinition()));
 3211         FromTU, functionDecl(hasName("x"), isDefinition()));
 3220         FromTU, functionDecl(hasName("x"), isDefinition()));
 3268       FromTU, functionDecl(hasName("f")));
 3366   auto FunPattern = functionDecl(hasName("g"),
 3972       ToTU, functionDecl(hasName("foo")));
 3976       FromTU, functionDecl(hasName("foo")));
 4060       unless(has(functionDecl(hasName("f"), isTemplateInstantiation()))));
 4064       FromTU, functionDecl(hasName("foo")));
 4083   auto Instantiation = functionDecl(hasName("f"), isTemplateInstantiation());
 4107       functionDecl(hasName("f"), isExplicitTemplateSpecialization());
 4129   auto Spec = functionDecl(hasName("f"), isExplicitTemplateSpecialization(),
 4173       FromTU, functionDecl(hasName("foo")));
 4178       DeclCounter<FunctionDecl>().match(FromTU, functionDecl(hasName("f"))),
 4179       DeclCounter<FunctionDecl>().match(ToTU, functionDecl(hasName("f"))));
 4208         FromTU, functionDecl(hasName("f")));
 4264       functionDecl(hasName("f"), isExplicitTemplateSpecialization()));
 4304       ToTU, functionDecl(hasName("foo")));
 4409   auto *F0 = FirstDeclMatcher<FunctionDecl>().match(ToTU, functionDecl());
 4410   auto *F2 = LastDeclMatcher<FunctionDecl>().match(ToTU, functionDecl());
 4430       ToTU, functionDecl(hasOverloadedOperatorName("+")));
 4432       ToTU, functionDecl(hasOverloadedOperatorName("-")));
 4454       ToTU, functionDecl(hasOverloadedOperatorName("+")));
 4463       FromTU, functionDecl(hasOverloadedOperatorName("+")));
 4626       FirstDeclMatcher<FunctionDecl>().match(ToTU, functionDecl(hasName("F")));
 4917       FromTU, functionDecl(hasName("foo")));
 4925       DeclCounter<FunctionDecl>().match(ToTU, functionDecl(hasName("foo"))),
 4945       FromTU, functionDecl(hasName("f")));
 4947       LastDeclMatcher<FunctionDecl>().match(FromTU, functionDecl(hasName("f")));
 4954   EXPECT_EQ(DeclCounter<FunctionDecl>().match(ToTU, functionDecl(hasName("f"))),
 4958       FirstDeclMatcher<FunctionDecl>().match(ToTU, functionDecl(hasName("f")));
 5120       FromTU, functionDecl(hasName("f")));
 5130       FromTU, functionDecl(hasName("ok")));
 5213       functionDecl(hasName("foo"), hasAncestor(cxxRecordDecl(hasName("A"))));
 5215       functionDecl(hasName("foo"), hasAncestor(cxxRecordDecl(hasName("B"))));
 5217       functionDecl(hasName("foo"), hasAncestor(cxxRecordDecl(hasName("C"))));
 5305       FromTU, functionDecl(hasName("f")));
 5564       FromTU, functionDecl(hasName("f")));
 5588       FromTU, functionDecl(hasName("f")));
tools/clang/unittests/AST/ASTImporterVisibilityTest.cpp
   28   BindableMatcher<Decl> operator()() { return functionDecl(hasName("f")); }
tools/clang/unittests/AST/ASTTraverserTest.cpp
   90   auto Result = ast_matchers::match(functionDecl(hasName(Name)).bind("fn"),
tools/clang/unittests/AST/ASTTypeTraitsTest.cpp
  154   EXPECT_TRUE(Verifier.match("void f() {}", functionDecl()));
  166   EXPECT_TRUE(Verifier.match("void f() {}", functionDecl()));
tools/clang/unittests/AST/DeclPrinterTest.cpp
  390       functionDecl(hasName("A"), isDefinition()).bind("id"),
  489     functionDecl(hasName("A"), isExplicitTemplateSpecialization()).bind("id"),
tools/clang/unittests/AST/SourceLocationTest.cpp
  243   EXPECT_TRUE(Verifier.match("class C { C(); };", functionDecl()));
  249   EXPECT_TRUE(Verifier.match("class C { C() = default; };", functionDecl()));
  255   EXPECT_TRUE(Verifier.match("class C { C() = delete; };", functionDecl()));
  639       functionDecl()));
  647       functionDecl(),
  658       functionDecl()));
  668       functionDecl(),
tools/clang/unittests/AST/StmtPrinterTest.cpp
   37   return functionDecl(hasName(ContainingFunction),
tools/clang/unittests/AST/StructuralEquivalenceTest.cpp
  237       functionDecl(hasOverloadedOperatorName("<")),
  238       functionDecl(hasOverloadedOperatorName("==")));
  246       functionDecl(hasOverloadedOperatorName("<")),
  247       functionDecl(hasOverloadedOperatorName("<")));
  496       functionDecl(hasName("foo")), cxxConstructorDecl(hasName("foo")));
  535       functionDecl(hasOverloadedOperatorName("+")),
  536       functionDecl(hasOverloadedOperatorName("-")));
  545       functionDecl(allOf(hasName("f"), isDefinition())));
  554       functionDecl(allOf(hasName("f"), isDefinition())));
 1312   auto X = findDeclPair<FunctionDecl>(TU, functionDecl(hasName("x")));
 1359       findDeclPair<FunctionDecl>(TU, functionDecl(hasName("x")))));
 1361       findDeclPair<FunctionDecl>(TU, functionDecl(hasName("y")))));
 1396       findDeclPair<FunctionDecl>(TU, functionDecl(hasName("x")))));
tools/clang/unittests/ASTMatchers/ASTMatchersInternalTest.cpp
  177                       functionDecl(isInline(), hasName("f"))));
tools/clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
   28       callExpr(allOf(callee(functionDecl(hasName("f"))),
   31       callExpr(allOf(callee(functionDecl(hasName("f"))),
   36       callExpr(allOf(callee(functionDecl(hasName("f"))),
   42       callExpr(allOf(callee(functionDecl(hasName("f"))),
  775   DeclarationMatcher AnyOpStar = functionDecl(hasOverloadedOperatorName("*"));
  975   DeclarationMatcher Function1Arg = functionDecl(parameterCountIs(1));
 1012   EXPECT_TRUE(matches("extern \"C\" void f() {}", functionDecl(isExternC())));
 1014                       functionDecl(isExternC())));
 1015   EXPECT_TRUE(notMatches("void f() {}", functionDecl(isExternC())));
 1026       matches("static void f() {}", functionDecl(isStaticStorageClass())));
 1030   EXPECT_TRUE(notMatches("void f() {}", functionDecl(isStaticStorageClass())));
 1035                          functionDecl(hasName("~A"), isDefaulted())));
 1037                       functionDecl(hasName("~B"), isDefaulted())));
 1042     notMatches("void Func();", functionDecl(hasName("Func"), isDeleted())));
 1044                       functionDecl(hasName("Func"), isDeleted())));
 1048   EXPECT_TRUE(notMatches("void f();", functionDecl(isNoThrow())));
 1049   EXPECT_TRUE(notMatches("void f() throw(int);", functionDecl(isNoThrow())));
 1051     notMatches("void f() noexcept(false);", functionDecl(isNoThrow())));
 1052   EXPECT_TRUE(matches("void f() throw();", functionDecl(isNoThrow())));
 1053   EXPECT_TRUE(matches("void f() noexcept;", functionDecl(isNoThrow())));
 1067                       functionDecl(hasName("bar"), isConstexpr())));
 1684   EXPECT_TRUE(notMatches("void f();", functionDecl(hasDynamicExceptionSpec())));
 1686                          functionDecl(hasDynamicExceptionSpec())));
 1688                          functionDecl(hasDynamicExceptionSpec())));
 1690                          functionDecl(hasDynamicExceptionSpec())));
 1692       matches("void j() throw();", functionDecl(hasDynamicExceptionSpec())));
 1694       matches("void k() throw(int);", functionDecl(hasDynamicExceptionSpec())));
 1696       matches("void l() throw(...);", functionDecl(hasDynamicExceptionSpec())));
 1857     functionDecl(hasParameter(0, hasType(recordDecl(hasName("A")))),
 1947             functionDecl(isInstantiated())));
 2027     functionDecl(isExplicitTemplateSpecialization())));
 2039     functionDecl(isExplicitTemplateSpecialization())));
 2049     functionDecl(isExplicitTemplateSpecialization())));
 2061     functionDecl(isExplicitTemplateSpecialization())));
 2065   EXPECT_TRUE(notMatches("void func();", functionDecl(isNoReturn())));
 2066   EXPECT_TRUE(notMatches("void func() {}", functionDecl(isNoReturn())));
 2068   EXPECT_TRUE(notMatchesC("void func();", functionDecl(isNoReturn())));
 2069   EXPECT_TRUE(notMatchesC("void func() {}", functionDecl(isNoReturn())));
 2072       notMatches("struct S { void func(); };", functionDecl(isNoReturn())));
 2074       notMatches("struct S { void func() {} };", functionDecl(isNoReturn())));
 2077                          functionDecl(isNoReturn())));
 2079                          functionDecl(isNoReturn())));
 2081   EXPECT_TRUE(notMatches("struct S { S(); };", functionDecl(isNoReturn())));
 2082   EXPECT_TRUE(notMatches("struct S { S() {} };", functionDecl(isNoReturn())));
 2086   EXPECT_TRUE(matches("[[noreturn]] void func();", functionDecl(isNoReturn())));
 2088       matches("[[noreturn]] void func() {}", functionDecl(isNoReturn())));
 2091                       functionDecl(isNoReturn())));
 2093                       functionDecl(isNoReturn())));
 2096                       functionDecl(isNoReturn())));
 2098                       functionDecl(isNoReturn())));
 2101       matches("struct S { [[noreturn]] S(); };", functionDecl(isNoReturn())));
 2103                       functionDecl(isNoReturn())));
 2108                       functionDecl(isNoReturn())));
 2110                       functionDecl(isNoReturn())));
 2113                       functionDecl(isNoReturn())));
 2115                       functionDecl(isNoReturn())));
 2119               functionDecl(isNoReturn())));
 2122               functionDecl(isNoReturn())));
 2125                       functionDecl(isNoReturn())));
 2127                       functionDecl(isNoReturn())));
 2132                       functionDecl(isNoReturn())));
 2134                       functionDecl(isNoReturn())));
 2137                       functionDecl(isNoReturn())));
 2139                       functionDecl(isNoReturn())));
 2336     functionDecl(returns(qualType().bind("type")),
 2350     functionDecl(
 2459                       functionDecl(hasTrailingReturn())));
 2460   EXPECT_TRUE(matches("auto X() -> int;", functionDecl(hasTrailingReturn())));
 2462                       functionDecl(hasTrailingReturn())));
 2463   EXPECT_TRUE(notMatches("int X();", functionDecl(hasTrailingReturn())));
 2464   EXPECT_TRUE(notMatchesC("void X();", functionDecl(hasTrailingReturn())));
 2470           functionDecl(hasTrailingReturn())));
 2473           functionDecl(hasTrailingReturn())));
 2505     matches("int main() {}", functionDecl(isMain())));
 2508     notMatches("int main2() {}", functionDecl(isMain())));
tools/clang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp
  169                       functionDecl(hasName("f"), hasParent(friendDecl()))));
  497   StatementMatcher CallFunctionF = callExpr(callee(functionDecl(hasName("f"))));
  522   EXPECT_TRUE(matches("void f(...);", functionDecl(isVariadic())));
  523   EXPECT_TRUE(notMatches("void f(int);", functionDecl(isVariadic())));
  525                          functionDecl(isVariadic())));
  526   EXPECT_TRUE(notMatches("void f();", functionDecl(isVariadic())));
  527   EXPECT_TRUE(notMatchesC("void f();", functionDecl(isVariadic())));
  528   EXPECT_TRUE(matches("void f(...);", functionDecl(parameterCountIs(0))));
  529   EXPECT_TRUE(matchesC("void f();", functionDecl(parameterCountIs(0))));
  530   EXPECT_TRUE(matches("void f(int, ...);", functionDecl(parameterCountIs(1))));
  551                                       functionDecl(hasName("g"))))))));
 1086                       declRefExpr(to(functionDecl(hasName("f"))))));
tools/clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
   81     functionDecl(forEachDescendant(
  267               cxxNewExpr(hasDeclaration(functionDecl(parameterCountIs(1))))));
  711     functionDecl(
  776                       functionDecl(returns(asString("int")))));
  778                          functionDecl(returns(asString("float")))));
  780                       functionDecl(returns(hasDeclaration(
  874     functionDecl(hasTemplateArgument(0, refersToType(asString("int"))))));
  877     functionDecl(hasTemplateArgument(0, refersToType(asString("int"))))));
  891     functionDecl(hasAnyTemplateArgument(templateArgument()))));
 1389   EXPECT_TRUE(matches("void f() {}", functionDecl(hasBody(compoundStmt()))));
 1390   EXPECT_TRUE(notMatches("void f();", functionDecl(hasBody(compoundStmt()))));
 1392                       functionDecl(hasBody(compoundStmt()))));
 1757                         hasTargetDecl(functionDecl())))));
 1760                            hasTargetDecl(functionDecl())))));
 1825       "void f();", functionDecl(hasExplicitSpecifier(constantExpr())), false,
 2022     functionDecl(decl().bind("x"), hasAnyParameter(hasName("y"))),
 2026     functionDecl(decl().bind("x"),
 2033       functionDecl(parameterCountIs(1))))),
 2046     functionDecl(decl().bind("x"), hasAncestor(recordDecl(hasName("::A")))),
 2133     integerLiteral(equals(42), hasAncestor(functionDecl(hasName("f"))))));
 2164             hasAncestor(functionDecl(hasParameter(
 2261       hasParent(compoundStmt(hasParent(functionDecl(
 2268               hasParent(compoundStmt(hasParent(functionDecl(hasParent(
 2275                      allOf(hasParent(functionDecl(hasParent(
 2277                            hasParent(functionDecl(hasParent(cxxRecordDecl(
 2415     functionDecl(hasName("f"),
 2458     functionDecl(hasName("f"),
 2611       matches(Fragment, unresolvedLookupExpr(hasAnyDeclaration(functionDecl(
 2614       matches(Fragment, unresolvedLookupExpr(hasAnyDeclaration(functionDecl(
 2617       notMatches(Fragment, unresolvedLookupExpr(hasAnyDeclaration(functionDecl(
 2620                                        functionDecl(hasName("bar"))))));
tools/clang/unittests/ASTMatchers/Dynamic/ParserTest.cpp
  204       functionDecl(hasParameter(0, hasName("a"))));
tools/clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp
  151   Value = functionDecl(constructMatcher("parameterCountIs", 2)
  179       functionDecl(constructMatcher(
tools/clang/unittests/ASTMatchers/Dynamic/VariantValueTest.cpp
  159               VariantValue(VariantMatcher::SingleMatcher(functionDecl()))
  177       "int x;", VariantValue(VariantMatcher::SingleMatcher(functionDecl()))
tools/clang/unittests/Analysis/CFGBuildResult.h
   58   Finder.addMatcher(ast_matchers::functionDecl().bind("func"), &Callback);
tools/clang/unittests/Tooling/RangeSelectorTest.cpp
  285   TestMatch Match = matchCode(Code, functionDecl().bind(ID));
  297   TestMatch Match = matchCode(Code, declRefExpr(to(functionDecl())).bind(Ref));
  332   TestMatch Match = matchCode(Code, declRefExpr(to(functionDecl())).bind(Ref));
  399       matchCode(Code, callExpr(callee(functionDecl(hasName("bar")))).bind(ID));
  560   TestMatch Match = matchCode(Code, functionDecl(hasName("bad")).bind(Fun));
tools/clang/unittests/Tooling/TransformerTest.cpp
  145       callExpr(callee(functionDecl(hasName("strlen"))),
  191   RewriteRule Rule = makeRule(callExpr(callee(functionDecl(hasName("f")))),
  209   RewriteRule Rule = makeRule(callExpr(callee(functionDecl(hasName("f")))),
  228   RewriteRule Rule = makeRule(functionDecl(hasName("bad")).bind(Fun),
  260   testRule(makeRule(declRefExpr(to(functionDecl(hasName("bad")))).bind(Ref),
  278   Transformer T(makeRule(declRefExpr(to(functionDecl())).bind(Ref),
  500       makeRule(callExpr(callee(functionDecl(hasName("f1")))),
  503       makeRule(callExpr(callee(functionDecl(hasAnyName("f1", "f2")))),
  525       makeRule(callExpr(callee(functionDecl(hasName("f1")))),
  528       makeRule(callExpr(callee(functionDecl(hasAnyName("f1", "f2")))),
  553       makeRule(callExpr(callee(functionDecl(hasName("f1")))),
  556       makeRule(callExpr(callee(functionDecl(hasAnyName("f1", "f2")))),
  558   RewriteRule DeclRule = makeRule(functionDecl(hasName("f2")).bind("fun"),
  620   Transformer T(makeRule(functionDecl(hasName("errorOccurred")),