Lines Matching refs:FDecl
1440 Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID, in CheckBuiltinFunctionCall() argument
1873 Context.getExceptionObjectType(FDecl->getParamDecl(0)->getType()), in CheckBuiltinFunctionCall()
4653 const NamedDecl *FDecl, in DiagnoseCStringFormatDirectiveInCFAPI() argument
4658 ObjCStringFormatFamily SFFamily = FDecl->getObjCFStringFormattingFamily(); in DiagnoseCStringFormatDirectiveInCFAPI()
4664 for (const auto *I : FDecl->specific_attrs<FormatAttr>()) { in DiagnoseCStringFormatDirectiveInCFAPI()
4686 S.Diag(FDecl->getLocation(), diag::note_entity_declared_at) in DiagnoseCStringFormatDirectiveInCFAPI()
4687 << FDecl->getDeclName(); in DiagnoseCStringFormatDirectiveInCFAPI()
4700 const NamedDecl *FDecl, in CheckNonNullArguments() argument
4704 assert((FDecl || Proto) && "Need a function declaration or prototype"); in CheckNonNullArguments()
4711 if (FDecl) { in CheckNonNullArguments()
4713 for (const auto *NonNull : FDecl->specific_attrs<NonNullAttr>()) { in CheckNonNullArguments()
4733 if (FDecl && (isa<FunctionDecl>(FDecl) || isa<ObjCMethodDecl>(FDecl))) { in CheckNonNullArguments()
4737 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(FDecl)) in CheckNonNullArguments()
4740 parms = cast<ObjCMethodDecl>(FDecl)->parameters(); in CheckNonNullArguments()
4758 if (const ValueDecl *VD = dyn_cast<ValueDecl>(FDecl)) { in CheckNonNullArguments()
4800 void Sema::CheckArgAlignment(SourceLocation Loc, NamedDecl *FDecl, in CheckArgAlignment() argument
4832 << ParamName << FDecl; in CheckArgAlignment()
4838 void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, in checkCall() argument
4848 if (FDecl) { in checkCall()
4849 for (const auto *I : FDecl->specific_attrs<FormatAttr>()) { in checkCall()
4860 auto *FD = dyn_cast_or_null<FunctionDecl>(FDecl); in checkCall()
4864 : FDecl && isa<FunctionDecl>(FDecl) in checkCall()
4865 ? cast<FunctionDecl>(FDecl)->getNumParams() in checkCall()
4866 : FDecl && isa<ObjCMethodDecl>(FDecl) in checkCall()
4867 ? cast<ObjCMethodDecl>(FDecl)->param_size() in checkCall()
4879 if (FDecl || Proto) { in checkCall()
4880 CheckNonNullArguments(*this, FDecl, Proto, Args, Loc); in checkCall()
4883 if (FDecl) { in checkCall()
4884 for (const auto *I : FDecl->specific_attrs<ArgumentWithTypeTagAttr>()) in checkCall()
4891 if (!Proto && FDecl) { in checkCall()
4892 const auto *FT = FDecl->getFunctionType(); in checkCall()
4894 Proto = cast<FunctionProtoType>(FDecl->getFunctionType()); in checkCall()
4908 CheckArgAlignment(Arg->getExprLoc(), FDecl, std::to_string(ArgIdx + 1), in checkCall()
4914 if (FDecl && FDecl->hasAttr<AllocAlignAttr>()) { in checkCall()
4915 auto *AA = FDecl->getAttr<AllocAlignAttr>(); in checkCall()
4938 void Sema::CheckConstructorCall(FunctionDecl *FDecl, QualType ThisType, in CheckConstructorCall() argument
4945 auto *Ctor = cast<CXXConstructorDecl>(FDecl); in CheckConstructorCall()
4946 CheckArgAlignment(Loc, FDecl, "'this'", Context.getPointerType(ThisType), in CheckConstructorCall()
4949 checkCall(FDecl, Proto, /*ThisArg=*/nullptr, Args, /*IsMemberFunction=*/true, in CheckConstructorCall()
4955 bool Sema::CheckFunctionCall(FunctionDecl *FDecl, CallExpr *TheCall, in CheckFunctionCall() argument
4958 isa<CXXMethodDecl>(FDecl); in CheckFunctionCall()
4961 VariadicCallType CallType = getVariadicCallType(FDecl, Proto, in CheckFunctionCall()
4988 Context.getPointerType(cast<CXXMethodDecl>(FDecl)->getThisObjectType()); in CheckFunctionCall()
4990 CheckArgAlignment(TheCall->getRParenLoc(), FDecl, "'this'", ThisType, in CheckFunctionCall()
4994 checkCall(FDecl, Proto, ImplicitThis, llvm::makeArrayRef(Args, NumArgs), in CheckFunctionCall()
4998 IdentifierInfo *FnInfo = FDecl->getIdentifier(); in CheckFunctionCall()
5004 CheckTCBEnforcement(TheCall, FDecl); in CheckFunctionCall()
5006 CheckAbsoluteValueFunction(TheCall, FDecl); in CheckFunctionCall()
5007 CheckMaxUnsignedZero(TheCall, FDecl); in CheckFunctionCall()
5010 DiagnoseCStringFormatDirectiveInCFAPI(*this, FDecl, Args, NumArgs); in CheckFunctionCall()
5012 unsigned CMId = FDecl->getMemoryFunctionKind(); in CheckFunctionCall()
5649 FunctionDecl *FDecl = cast<FunctionDecl>(DRE->getDecl()); in SemaBuiltinAtomicOverloaded() local
5760 unsigned BuiltinID = FDecl->getBuiltinID(); in SemaBuiltinAtomicOverloaded()
5949 NewBuiltinDecl = FDecl; in SemaBuiltinAtomicOverloaded()
6025 FunctionDecl *FDecl = cast<FunctionDecl>(DRE->getDecl()); in SemaBuiltinNontemporalOverloaded() local
6026 unsigned BuiltinID = FDecl->getBuiltinID(); in SemaBuiltinNontemporalOverloaded()
6859 FunctionDecl *FDecl = cast<FunctionDecl>(DRE->getDecl()); in SemaBuiltinConstantArg() local
6866 << FDecl->getDeclName() << Arg->getSourceRange(); in SemaBuiltinConstantArg()
9785 static unsigned getAbsoluteValueFunctionKind(const FunctionDecl *FDecl) { in getAbsoluteValueFunctionKind() argument
9786 const IdentifierInfo *FnInfo = FDecl->getIdentifier(); in getAbsoluteValueFunctionKind()
9790 switch (FDecl->getBuiltinID()) { in getAbsoluteValueFunctionKind()
9811 return FDecl->getBuiltinID(); in getAbsoluteValueFunctionKind()
9840 const FunctionDecl *FDecl = nullptr; in emitReplacement() local
9842 FDecl = dyn_cast<FunctionDecl>(UsingD->getTargetDecl()); in emitReplacement()
9844 FDecl = dyn_cast<FunctionDecl>(I); in emitReplacement()
9846 if (!FDecl) in emitReplacement()
9850 if (FDecl->getNumParams() != 1) in emitReplacement()
9854 QualType ParamType = FDecl->getParamDecl(0)->getType(); in emitReplacement()
9901 static bool IsStdFunction(const FunctionDecl *FDecl, in IsStdFunction() argument
9903 if (!FDecl) in IsStdFunction()
9905 if (!FDecl->getIdentifier() || !FDecl->getIdentifier()->isStr(Str)) in IsStdFunction()
9907 if (!FDecl->isInStdNamespace()) in IsStdFunction()
9915 const FunctionDecl *FDecl) { in CheckAbsoluteValueFunction() argument
9919 unsigned AbsKind = getAbsoluteValueFunctionKind(FDecl); in CheckAbsoluteValueFunction()
9920 bool IsStdAbs = IsStdFunction(FDecl, "abs"); in CheckAbsoluteValueFunction()
9968 << FDecl << ArgType << ParamType; in CheckAbsoluteValueFunction()
9987 << FDecl << ParamValueKind << ArgValueKind; in CheckAbsoluteValueFunction()
9995 const FunctionDecl *FDecl) { in CheckMaxUnsignedZero() argument
9996 if (!Call || !FDecl) return; in CheckMaxUnsignedZero()
10004 if (!IsStdFunction(FDecl, "max")) return; in CheckMaxUnsignedZero()
10005 const auto * ArgList = FDecl->getTemplateSpecializationArgs(); in CheckMaxUnsignedZero()