Lines Matching refs:FDecl

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