Home | History | Annotate | Download | only in Checkers

Lines Matching refs:FD

262   bool isMemFunction(const FunctionDecl *FD, ASTContext &C) const;
263 bool isCMemFunction(const FunctionDecl *FD,
267 bool isStandardNewDelete(const FunctionDecl *FD, ASTContext &C) const;
548 bool MallocChecker::isMemFunction(const FunctionDecl *FD, ASTContext &C) const {
549 if (isCMemFunction(FD, C, AF_Malloc, MemoryOperationKind::MOK_Any))
552 if (isCMemFunction(FD, C, AF_IfNameIndex, MemoryOperationKind::MOK_Any))
555 if (isCMemFunction(FD, C, AF_Alloca, MemoryOperationKind::MOK_Any))
558 if (isStandardNewDelete(FD, C))
564 bool MallocChecker::isCMemFunction(const FunctionDecl *FD,
568 if (!FD)
576 if (FD->getKind() == Decl::Function) {
577 const IdentifierInfo *FunI = FD->getIdentifier();
611 if (IsOptimistic && FD->hasAttrs()) {
612 for (const auto *I : FD->specific_attrs<OwnershipAttr>()) {
631 bool MallocChecker::isStandardNewDelete(const FunctionDecl *FD,
633 if (!FD)
636 OverloadedOperatorKind Kind = FD->getOverloadedOperator();
642 if (isa<CXXMethodDecl>(FD))
646 if (FD->getNumParams() == 2) {
647 QualType T = FD->getParamDecl(1)->getType();
653 if (FD->getNumParams() != 1 || FD->isVariadic())
742 const FunctionDecl *FD = C.getCalleeDecl(CE);
743 if (!FD)
749 if (FD->getKind() == Decl::Function) {
751 IdentifierInfo *FunI = FD->getIdentifier();
800 } else if (isStandardNewDelete(FD, C.getASTContext())) {
805 OverloadedOperatorKind K = FD->getOverloadedOperator();
833 if (FD->hasAttrs())
834 for (const auto *I : FD->specific_attrs<OwnershipAttr>()) {
1197 const FunctionDecl *FD = C.getCalleeDecl(CE);
1199 if (!FD)
1200 FD = dyn_cast<FunctionDecl>(CE->getCalleeDecl());
1204 if (isCMemFunction(FD, Ctx, AF_Malloc, MemoryOperationKind::MOK_Any))
1207 if (isStandardNewDelete(FD, Ctx)) {
1208 OverloadedOperatorKind Kind = FD->getOverloadedOperator();
1215 if (isCMemFunction(FD, Ctx, AF_IfNameIndex, MemoryOperationKind::MOK_Any))
1218 if (isCMemFunction(FD, Ctx, AF_Alloca, MemoryOperationKind::MOK_Any))
1240 const FunctionDecl *FD = CE->getDirectCallee();
1241 if (!FD)
1244 os << *FD;
1245 if (!FD->isOverloadedOperator())
1520 const NamedDecl *FD = cast<FunctionTextRegion>(MR)->getDecl();
1521 if (FD)
1522 os << "the address of the function '" << *FD << '\'';
2184 const FunctionDecl *FD = FC->getDecl();
2185 if (!FD)
2190 (isCMemFunction(FD, Ctx, AF_Malloc, MemoryOperationKind::MOK_Free) ||
2191 isCMemFunction(FD, Ctx, AF_IfNameIndex,
2196 isStandardNewDelete(FD, Ctx))
2441 const FunctionDecl *FD = cast<SimpleFunctionCall>(Call)->getDecl();
2442 if (!FD)
2449 if (isMemFunction(FD, ASTC))
2457 const IdentifierInfo *II = FD->getIdentifier();