Lines Matching refs:FDecl
1440 Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID, in CheckBuiltinFunctionCall() argument
1869 Context.getExceptionObjectType(FDecl->getParamDecl(0)->getType()), in CheckBuiltinFunctionCall()
4408 const NamedDecl *FDecl, in DiagnoseCStringFormatDirectiveInCFAPI() argument
4413 ObjCStringFormatFamily SFFamily = FDecl->getObjCFStringFormattingFamily(); in DiagnoseCStringFormatDirectiveInCFAPI()
4419 for (const auto *I : FDecl->specific_attrs<FormatAttr>()) { in DiagnoseCStringFormatDirectiveInCFAPI()
4441 S.Diag(FDecl->getLocation(), diag::note_entity_declared_at) in DiagnoseCStringFormatDirectiveInCFAPI()
4442 << FDecl->getDeclName(); in DiagnoseCStringFormatDirectiveInCFAPI()
4455 const NamedDecl *FDecl, in CheckNonNullArguments() argument
4459 assert((FDecl || Proto) && "Need a function declaration or prototype"); in CheckNonNullArguments()
4466 if (FDecl) { in CheckNonNullArguments()
4468 for (const auto *NonNull : FDecl->specific_attrs<NonNullAttr>()) { in CheckNonNullArguments()
4488 if (FDecl && (isa<FunctionDecl>(FDecl) || isa<ObjCMethodDecl>(FDecl))) { in CheckNonNullArguments()
4492 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(FDecl)) in CheckNonNullArguments()
4495 parms = cast<ObjCMethodDecl>(FDecl)->parameters(); in CheckNonNullArguments()
4513 if (const ValueDecl *VD = dyn_cast<ValueDecl>(FDecl)) { in CheckNonNullArguments()
4555 void Sema::CheckArgAlignment(SourceLocation Loc, NamedDecl *FDecl, in CheckArgAlignment() argument
4586 << ParamName << FDecl; in CheckArgAlignment()
4592 void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, in checkCall() argument
4602 if (FDecl) { in checkCall()
4603 for (const auto *I : FDecl->specific_attrs<FormatAttr>()) { in checkCall()
4614 auto *FD = dyn_cast_or_null<FunctionDecl>(FDecl); in checkCall()
4618 : FDecl && isa<FunctionDecl>(FDecl) in checkCall()
4619 ? cast<FunctionDecl>(FDecl)->getNumParams() in checkCall()
4620 : FDecl && isa<ObjCMethodDecl>(FDecl) in checkCall()
4621 ? cast<ObjCMethodDecl>(FDecl)->param_size() in checkCall()
4633 if (FDecl || Proto) { in checkCall()
4634 CheckNonNullArguments(*this, FDecl, Proto, Args, Loc); in checkCall()
4637 if (FDecl) { in checkCall()
4638 for (const auto *I : FDecl->specific_attrs<ArgumentWithTypeTagAttr>()) in checkCall()
4645 if (!Proto && FDecl) { in checkCall()
4646 const auto *FT = FDecl->getFunctionType(); in checkCall()
4648 Proto = cast<FunctionProtoType>(FDecl->getFunctionType()); in checkCall()
4659 CheckArgAlignment(Arg->getExprLoc(), FDecl, std::to_string(ArgIdx + 1), in checkCall()
4665 if (FDecl && FDecl->hasAttr<AllocAlignAttr>()) { in checkCall()
4666 auto *AA = FDecl->getAttr<AllocAlignAttr>(); in checkCall()
4689 void Sema::CheckConstructorCall(FunctionDecl *FDecl, QualType ThisType, in CheckConstructorCall() argument
4696 auto *Ctor = cast<CXXConstructorDecl>(FDecl); in CheckConstructorCall()
4697 CheckArgAlignment(Loc, FDecl, "'this'", Context.getPointerType(ThisType), in CheckConstructorCall()
4700 checkCall(FDecl, Proto, /*ThisArg=*/nullptr, Args, /*IsMemberFunction=*/true, in CheckConstructorCall()
4706 bool Sema::CheckFunctionCall(FunctionDecl *FDecl, CallExpr *TheCall, in CheckFunctionCall() argument
4709 isa<CXXMethodDecl>(FDecl); in CheckFunctionCall()
4712 VariadicCallType CallType = getVariadicCallType(FDecl, Proto, in CheckFunctionCall()
4739 Context.getPointerType(cast<CXXMethodDecl>(FDecl)->getThisObjectType()); in CheckFunctionCall()
4741 CheckArgAlignment(TheCall->getRParenLoc(), FDecl, "'this'", ThisType, in CheckFunctionCall()
4745 checkCall(FDecl, Proto, ImplicitThis, llvm::makeArrayRef(Args, NumArgs), in CheckFunctionCall()
4749 IdentifierInfo *FnInfo = FDecl->getIdentifier(); in CheckFunctionCall()
4755 CheckTCBEnforcement(TheCall, FDecl); in CheckFunctionCall()
4757 CheckAbsoluteValueFunction(TheCall, FDecl); in CheckFunctionCall()
4758 CheckMaxUnsignedZero(TheCall, FDecl); in CheckFunctionCall()
4761 DiagnoseCStringFormatDirectiveInCFAPI(*this, FDecl, Args, NumArgs); in CheckFunctionCall()
4763 unsigned CMId = FDecl->getMemoryFunctionKind(); in CheckFunctionCall()
5400 FunctionDecl *FDecl = cast<FunctionDecl>(DRE->getDecl()); in SemaBuiltinAtomicOverloaded() local
5511 unsigned BuiltinID = FDecl->getBuiltinID(); in SemaBuiltinAtomicOverloaded()
5700 NewBuiltinDecl = FDecl; in SemaBuiltinAtomicOverloaded()
5776 FunctionDecl *FDecl = cast<FunctionDecl>(DRE->getDecl()); in SemaBuiltinNontemporalOverloaded() local
5777 unsigned BuiltinID = FDecl->getBuiltinID(); in SemaBuiltinNontemporalOverloaded()
6587 FunctionDecl *FDecl = cast<FunctionDecl>(DRE->getDecl()); in SemaBuiltinConstantArg() local
6594 << FDecl->getDeclName() << Arg->getSourceRange(); in SemaBuiltinConstantArg()
9513 static unsigned getAbsoluteValueFunctionKind(const FunctionDecl *FDecl) { in getAbsoluteValueFunctionKind() argument
9514 const IdentifierInfo *FnInfo = FDecl->getIdentifier(); in getAbsoluteValueFunctionKind()
9518 switch (FDecl->getBuiltinID()) { in getAbsoluteValueFunctionKind()
9539 return FDecl->getBuiltinID(); in getAbsoluteValueFunctionKind()
9568 const FunctionDecl *FDecl = nullptr; in emitReplacement() local
9570 FDecl = dyn_cast<FunctionDecl>(UsingD->getTargetDecl()); in emitReplacement()
9572 FDecl = dyn_cast<FunctionDecl>(I); in emitReplacement()
9574 if (!FDecl) in emitReplacement()
9578 if (FDecl->getNumParams() != 1) in emitReplacement()
9582 QualType ParamType = FDecl->getParamDecl(0)->getType(); in emitReplacement()
9629 static bool IsStdFunction(const FunctionDecl *FDecl, in IsStdFunction() argument
9631 if (!FDecl) in IsStdFunction()
9633 if (!FDecl->getIdentifier() || !FDecl->getIdentifier()->isStr(Str)) in IsStdFunction()
9635 if (!FDecl->isInStdNamespace()) in IsStdFunction()
9643 const FunctionDecl *FDecl) { in CheckAbsoluteValueFunction() argument
9647 unsigned AbsKind = getAbsoluteValueFunctionKind(FDecl); in CheckAbsoluteValueFunction()
9648 bool IsStdAbs = IsStdFunction(FDecl, "abs"); in CheckAbsoluteValueFunction()
9696 << FDecl << ArgType << ParamType; in CheckAbsoluteValueFunction()
9715 << FDecl << ParamValueKind << ArgValueKind; in CheckAbsoluteValueFunction()
9723 const FunctionDecl *FDecl) { in CheckMaxUnsignedZero() argument
9724 if (!Call || !FDecl) return; in CheckMaxUnsignedZero()
9732 if (!IsStdFunction(FDecl, "max")) return; in CheckMaxUnsignedZero()
9733 const auto * ArgList = FDecl->getTemplateSpecializationArgs(); in CheckMaxUnsignedZero()