Home | History | Annotate | Download | only in Checkers

Lines Matching defs:FD

232   bool isMemFunction(const FunctionDecl *FD, ASTContext &C) const;
233 bool isFreeFunction(const FunctionDecl *FD, ASTContext &C) const;
234 bool isAllocationFunction(const FunctionDecl *FD, ASTContext &C) const;
235 bool isStandardNewDelete(const FunctionDecl *FD, ASTContext &C) const;
478 bool MallocChecker::isMemFunction(const FunctionDecl *FD, ASTContext &C) const {
479 if (isFreeFunction(FD, C))
482 if (isAllocationFunction(FD, C))
485 if (isStandardNewDelete(FD, C))
491 bool MallocChecker::isAllocationFunction(const FunctionDecl *FD,
493 if (!FD)
496 if (FD->getKind() == Decl::Function) {
497 IdentifierInfo *FunI = FD->getIdentifier();
506 if (Filter.CMallocOptimistic && FD->hasAttrs())
508 i = FD->specific_attr_begin<OwnershipAttr>(),
509 e = FD->specific_attr_end<OwnershipAttr>();
516 bool MallocChecker::isFreeFunction(const FunctionDecl *FD, ASTContext &C) const {
517 if (!FD)
520 if (FD->getKind() == Decl::Function) {
521 IdentifierInfo *FunI = FD->getIdentifier();
528 if (Filter.CMallocOptimistic && FD->hasAttrs())
530 i = FD->specific_attr_begin<OwnershipAttr>(),
531 e = FD->specific_attr_end<OwnershipAttr>();
543 bool MallocChecker::isStandardNewDelete(const FunctionDecl *FD,
545 if (!FD)
548 OverloadedOperatorKind Kind = FD->getOverloadedOperator();
554 if (isa<CXXMethodDecl>(FD))
558 if (FD->getNumParams() == 2) {
559 QualType T = FD->getParamDecl(1)->getType();
565 if (FD->getNumParams() != 1 || FD->isVariadic())
576 const FunctionDecl *FD = C.getCalleeDecl(CE);
577 if (!FD)
583 if (FD->getKind() == Decl::Function) {
585 IdentifierInfo *FunI = FD->getIdentifier();
604 else if (isStandardNewDelete(FD, C.getASTContext())) {
609 OverloadedOperatorKind K = FD->getOverloadedOperator();
626 if (FD->hasAttrs())
628 i = FD->specific_attr_begin<OwnershipAttr>(),
629 e = FD->specific_attr_end<OwnershipAttr>();
860 const FunctionDecl *FD = C.getCalleeDecl(CE);
862 if (!FD)
863 FD = dyn_cast<FunctionDecl>(CE->getCalleeDecl());
867 if (isAllocationFunction(FD, Ctx) || isFreeFunction(FD, Ctx))
870 if (isStandardNewDelete(FD, Ctx)) {
871 OverloadedOperatorKind Kind = FD->getOverloadedOperator();
897 const FunctionDecl *FD = CE->getDirectCallee();
898 if (!FD)
901 os << *FD;
902 if (!FD->isOverloadedOperator())
1142 const NamedDecl *FD = cast<FunctionTextRegion>(MR)->getDecl();
1143 if (FD)
1144 os << "the address of the function '" << *FD << '\'';
1687 const FunctionDecl *FD = FC->getDecl();
1688 if (!FD)
1692 isFreeFunction(FD, C.getASTContext()))
1696 isStandardNewDelete(FD, C.getASTContext()))
1916 const FunctionDecl *FD = cast<FunctionCall>(Call)->getDecl();
1917 if (!FD)
1924 if (isMemFunction(FD, ASTC))
1932 const IdentifierInfo *II = FD->getIdentifier();