Lines Matching defs:FDecl
2060 Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID,
2497 Context.getExceptionObjectType(FDecl->getParamDecl(0)->getType()),
2515 QualType Param = FDecl->getParamDecl(0)->getType();
2516 QualType Result = FDecl->getReturnType();
2525 << FDecl;
3021 const NamedDecl *FDecl,
3025 assert((FDecl || Proto) && "Need a function declaration or prototype");
3032 if (FDecl) {
3034 for (const auto *NonNull : FDecl->specific_attrs<NonNullAttr>()) {
3054 if (FDecl && (isa<FunctionDecl>(FDecl) || isa<ObjCMethodDecl>(FDecl))) {
3058 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(FDecl))
3061 parms = cast<ObjCMethodDecl>(FDecl)->parameters();
3078 if (const ValueDecl *VD = dyn_cast<ValueDecl>(FDecl)) {
3116 void Sema::CheckArgAlignment(SourceLocation Loc, NamedDecl *FDecl,
3148 << ParamName << (FDecl != nullptr) << FDecl;
3151 void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto,
3161 if (FDecl) {
3162 for (const auto *I : FDecl->specific_attrs<FormatAttr>()) {
3173 auto *FD = dyn_cast_or_null<FunctionDecl>(FDecl);
3177 : isa_and_nonnull<FunctionDecl>(FDecl)
3178 ? cast<FunctionDecl>(FDecl)->getNumParams()
3179 : isa_and_nonnull<ObjCMethodDecl>(FDecl)
3180 ? cast<ObjCMethodDecl>(FDecl)->param_size()
3192 if (FDecl || Proto) {
3193 CheckNonNullArguments(*this, FDecl, Proto, Args, Loc);
3196 if (FDecl) {
3197 for (const auto *I : FDecl->specific_attrs<ArgumentWithTypeTagAttr>())
3204 if (!Proto && FDecl) {
3205 const auto *FT = FDecl->getFunctionType();
3207 Proto = cast<FunctionProtoType>(FDecl->getFunctionType());
3221 if (Context.getTargetInfo().getTriple().isOSAIX() && FDecl && Arg &&
3222 FDecl->hasLinkage() &&
3223 FDecl->getFormalLinkage() != Linkage::Internal &&
3231 CheckArgAlignment(Arg->getExprLoc(), FDecl, std::to_string(ArgIdx + 1),
3314 if (FDecl && FDecl->hasAttr<AllocAlignAttr>()) {
3315 auto *AA = FDecl->getAttr<AllocAlignAttr>();
3342 void Sema::CheckConstructorCall(FunctionDecl *FDecl, QualType ThisType,
3349 auto *Ctor = cast<CXXConstructorDecl>(FDecl);
3351 Loc, FDecl, "'this'", Context.getPointerType(ThisType),
3354 checkCall(FDecl, Proto, /*ThisArg=*/nullptr, Args, /*IsMemberFunction=*/true,
3358 bool Sema::CheckFunctionCall(FunctionDecl *FDecl, CallExpr *TheCall,
3361 isa<CXXMethodDecl>(FDecl);
3364 VariadicCallType CallType = getVariadicCallType(FDecl, Proto,
3370 if (IsMemberOperatorCall && !FDecl->hasCXXExplicitFunctionObjectParameter()) {
3377 } else if (IsMemberFunction && !FDecl->isStatic() &&
3378 !FDecl->hasCXXExplicitFunctionObjectParameter())
3392 cast<CXXMethodDecl>(FDecl)->getFunctionObjectParameterType());
3394 CheckArgAlignment(TheCall->getRParenLoc(), FDecl, "'this'", ThisType,
3398 checkCall(FDecl, Proto, ImplicitThis, llvm::ArrayRef(Args, NumArgs),
3402 IdentifierInfo *FnInfo = FDecl->getIdentifier();
3409 if (FDecl->getBuiltinID() == 0)
3410 CheckTCBEnforcement(TheCall->getExprLoc(), FDecl);
3412 CheckAbsoluteValueFunction(TheCall, FDecl);
3413 CheckMaxUnsignedZero(TheCall, FDecl);
3414 CheckInfNaNFunction(TheCall, FDecl);
3417 ObjC().DiagnoseCStringFormatDirectiveInCFAPI(FDecl, Args, NumArgs);
3419 unsigned CMId = FDecl->getMemoryFunctionKind();
3474 VariadicCallType CallType = getVariadicCallType(/*FDecl=*/nullptr, Proto,
3476 checkCall(/*FDecl=*/nullptr, Proto, /*ThisArg=*/nullptr,
4128 FunctionDecl *FDecl = cast<FunctionDecl>(DRE->getDecl());
4240 unsigned BuiltinID = FDecl->getBuiltinID();
4429 NewBuiltinDecl = FDecl;
4499 FunctionDecl *FDecl = cast<FunctionDecl>(DRE->getDecl());
4500 unsigned BuiltinID = FDecl->getBuiltinID();
5308 FunctionDecl *FDecl = cast<FunctionDecl>(DRE->getDecl());
5315 << FDecl->getDeclName() << Arg->getSourceRange();
8077 static unsigned getAbsoluteValueFunctionKind(const FunctionDecl *FDecl) {
8078 const IdentifierInfo *FnInfo = FDecl->getIdentifier();
8082 switch (FDecl->getBuiltinID()) {
8103 return FDecl->getBuiltinID();
8132 const FunctionDecl *FDecl = nullptr;
8134 FDecl = dyn_cast<FunctionDecl>(UsingD->getTargetDecl());
8136 FDecl = dyn_cast<FunctionDecl>(I);
8138 if (!FDecl)
8142 if (FDecl->getNumParams() != 1)
8146 QualType ParamType = FDecl->getParamDecl(0)->getType();
8193 static bool IsStdFunction(const FunctionDecl *FDecl,
8195 if (!FDecl)
8197 if (!FDecl->getIdentifier() || !FDecl->getIdentifier()->isStr(Str))
8199 if (!FDecl->isInStdNamespace())
8206 const FunctionDecl *FDecl) {
8208 if ((IsStdFunction(FDecl, "isnan") || IsStdFunction(FDecl, "isunordered") ||
8213 else if ((IsStdFunction(FDecl, "isinf") ||
8214 (IsStdFunction(FDecl, "isfinite") ||
8215 (FDecl->getIdentifier() && FDecl->getName() == "infinity"))) &&
8222 const FunctionDecl *FDecl) {
8226 unsigned AbsKind = getAbsoluteValueFunctionKind(FDecl);
8227 bool IsStdAbs = IsStdFunction(FDecl, "abs");
8275 << FDecl << ArgType << ParamType;
8294 << FDecl << ParamValueKind << ArgValueKind;
8302 const FunctionDecl *FDecl) {
8303 if (!Call || !FDecl) return;
8311 if (!IsStdFunction(FDecl, "max")) return;
8312 const auto * ArgList = FDecl->getTemplateSpecializationArgs();