Lines Matching refs:FDecl
2059 Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID, in CheckBuiltinFunctionCall() argument
2465 Context.getExceptionObjectType(FDecl->getParamDecl(0)->getType()), in CheckBuiltinFunctionCall()
2482 QualType Param = FDecl->getParamDecl(0)->getType(); in CheckBuiltinFunctionCall()
2483 QualType Result = FDecl->getReturnType(); in CheckBuiltinFunctionCall()
2492 << FDecl; in CheckBuiltinFunctionCall()
5684 const NamedDecl *FDecl, in DiagnoseCStringFormatDirectiveInCFAPI() argument
5689 ObjCStringFormatFamily SFFamily = FDecl->getObjCFStringFormattingFamily(); in DiagnoseCStringFormatDirectiveInCFAPI()
5695 for (const auto *I : FDecl->specific_attrs<FormatAttr>()) { in DiagnoseCStringFormatDirectiveInCFAPI()
5717 S.Diag(FDecl->getLocation(), diag::note_entity_declared_at) in DiagnoseCStringFormatDirectiveInCFAPI()
5718 << FDecl->getDeclName(); in DiagnoseCStringFormatDirectiveInCFAPI()
5731 const NamedDecl *FDecl, in CheckNonNullArguments() argument
5735 assert((FDecl || Proto) && "Need a function declaration or prototype"); in CheckNonNullArguments()
5742 if (FDecl) { in CheckNonNullArguments()
5744 for (const auto *NonNull : FDecl->specific_attrs<NonNullAttr>()) { in CheckNonNullArguments()
5764 if (FDecl && (isa<FunctionDecl>(FDecl) || isa<ObjCMethodDecl>(FDecl))) { in CheckNonNullArguments()
5768 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(FDecl)) in CheckNonNullArguments()
5771 parms = cast<ObjCMethodDecl>(FDecl)->parameters(); in CheckNonNullArguments()
5788 if (const ValueDecl *VD = dyn_cast<ValueDecl>(FDecl)) { in CheckNonNullArguments()
5864 void Sema::CheckArgAlignment(SourceLocation Loc, NamedDecl *FDecl, in CheckArgAlignment() argument
5896 << ParamName << (FDecl != nullptr) << FDecl; in CheckArgAlignment()
5902 void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, in checkCall() argument
5912 if (FDecl) { in checkCall()
5913 for (const auto *I : FDecl->specific_attrs<FormatAttr>()) { in checkCall()
5924 auto *FD = dyn_cast_or_null<FunctionDecl>(FDecl); in checkCall()
5928 : FDecl && isa<FunctionDecl>(FDecl) in checkCall()
5929 ? cast<FunctionDecl>(FDecl)->getNumParams() in checkCall()
5930 : FDecl && isa<ObjCMethodDecl>(FDecl) in checkCall()
5931 ? cast<ObjCMethodDecl>(FDecl)->param_size() in checkCall()
5943 if (FDecl || Proto) { in checkCall()
5944 CheckNonNullArguments(*this, FDecl, Proto, Args, Loc); in checkCall()
5947 if (FDecl) { in checkCall()
5948 for (const auto *I : FDecl->specific_attrs<ArgumentWithTypeTagAttr>()) in checkCall()
5955 if (!Proto && FDecl) { in checkCall()
5956 const auto *FT = FDecl->getFunctionType(); in checkCall()
5958 Proto = cast<FunctionProtoType>(FDecl->getFunctionType()); in checkCall()
5970 if (Context.getTargetInfo().getTriple().isOSAIX() && FDecl && Arg && in checkCall()
5971 FDecl->hasLinkage() && in checkCall()
5972 FDecl->getFormalLinkage() != InternalLinkage && in checkCall()
5978 CheckArgAlignment(Arg->getExprLoc(), FDecl, std::to_string(ArgIdx + 1), in checkCall()
5984 if (FDecl && FDecl->hasAttr<AllocAlignAttr>()) { in checkCall()
5985 auto *AA = FDecl->getAttr<AllocAlignAttr>(); in checkCall()
6008 void Sema::CheckConstructorCall(FunctionDecl *FDecl, QualType ThisType, in CheckConstructorCall() argument
6015 auto *Ctor = cast<CXXConstructorDecl>(FDecl); in CheckConstructorCall()
6016 CheckArgAlignment(Loc, FDecl, "'this'", Context.getPointerType(ThisType), in CheckConstructorCall()
6019 checkCall(FDecl, Proto, /*ThisArg=*/nullptr, Args, /*IsMemberFunction=*/true, in CheckConstructorCall()
6025 bool Sema::CheckFunctionCall(FunctionDecl *FDecl, CallExpr *TheCall, in CheckFunctionCall() argument
6028 isa<CXXMethodDecl>(FDecl); in CheckFunctionCall()
6031 VariadicCallType CallType = getVariadicCallType(FDecl, Proto, in CheckFunctionCall()
6037 if (IsMemberOperatorCall && !FDecl->isStatic()) { in CheckFunctionCall()
6044 } else if (IsMemberFunction && !FDecl->isStatic()) in CheckFunctionCall()
6058 Context.getPointerType(cast<CXXMethodDecl>(FDecl)->getThisObjectType()); in CheckFunctionCall()
6060 CheckArgAlignment(TheCall->getRParenLoc(), FDecl, "'this'", ThisType, in CheckFunctionCall()
6064 checkCall(FDecl, Proto, ImplicitThis, llvm::ArrayRef(Args, NumArgs), in CheckFunctionCall()
6068 IdentifierInfo *FnInfo = FDecl->getIdentifier(); in CheckFunctionCall()
6075 if (FDecl->getBuiltinID() == 0) in CheckFunctionCall()
6076 CheckTCBEnforcement(TheCall->getExprLoc(), FDecl); in CheckFunctionCall()
6078 CheckAbsoluteValueFunction(TheCall, FDecl); in CheckFunctionCall()
6079 CheckMaxUnsignedZero(TheCall, FDecl); in CheckFunctionCall()
6082 DiagnoseCStringFormatDirectiveInCFAPI(*this, FDecl, Args, NumArgs); in CheckFunctionCall()
6084 unsigned CMId = FDecl->getMemoryFunctionKind(); in CheckFunctionCall()
6743 FunctionDecl *FDecl = cast<FunctionDecl>(DRE->getDecl()); in SemaBuiltinAtomicOverloaded() local
6854 unsigned BuiltinID = FDecl->getBuiltinID(); in SemaBuiltinAtomicOverloaded()
7043 NewBuiltinDecl = FDecl; in SemaBuiltinAtomicOverloaded()
7119 FunctionDecl *FDecl = cast<FunctionDecl>(DRE->getDecl()); in SemaBuiltinNontemporalOverloaded() local
7120 unsigned BuiltinID = FDecl->getBuiltinID(); in SemaBuiltinNontemporalOverloaded()
7980 FunctionDecl *FDecl = cast<FunctionDecl>(DRE->getDecl()); in SemaBuiltinConstantArg() local
7987 << FDecl->getDeclName() << Arg->getSourceRange(); in SemaBuiltinConstantArg()
11113 static unsigned getAbsoluteValueFunctionKind(const FunctionDecl *FDecl) { in getAbsoluteValueFunctionKind() argument
11114 const IdentifierInfo *FnInfo = FDecl->getIdentifier(); in getAbsoluteValueFunctionKind()
11118 switch (FDecl->getBuiltinID()) { in getAbsoluteValueFunctionKind()
11139 return FDecl->getBuiltinID(); in getAbsoluteValueFunctionKind()
11168 const FunctionDecl *FDecl = nullptr; in emitReplacement() local
11170 FDecl = dyn_cast<FunctionDecl>(UsingD->getTargetDecl()); in emitReplacement()
11172 FDecl = dyn_cast<FunctionDecl>(I); in emitReplacement()
11174 if (!FDecl) in emitReplacement()
11178 if (FDecl->getNumParams() != 1) in emitReplacement()
11182 QualType ParamType = FDecl->getParamDecl(0)->getType(); in emitReplacement()
11229 static bool IsStdFunction(const FunctionDecl *FDecl, in IsStdFunction() argument
11231 if (!FDecl) in IsStdFunction()
11233 if (!FDecl->getIdentifier() || !FDecl->getIdentifier()->isStr(Str)) in IsStdFunction()
11235 if (!FDecl->isInStdNamespace()) in IsStdFunction()
11243 const FunctionDecl *FDecl) { in CheckAbsoluteValueFunction() argument
11247 unsigned AbsKind = getAbsoluteValueFunctionKind(FDecl); in CheckAbsoluteValueFunction()
11248 bool IsStdAbs = IsStdFunction(FDecl, "abs"); in CheckAbsoluteValueFunction()
11296 << FDecl << ArgType << ParamType; in CheckAbsoluteValueFunction()
11315 << FDecl << ParamValueKind << ArgValueKind; in CheckAbsoluteValueFunction()
11323 const FunctionDecl *FDecl) { in CheckMaxUnsignedZero() argument
11324 if (!Call || !FDecl) return; in CheckMaxUnsignedZero()
11332 if (!IsStdFunction(FDecl, "max")) return; in CheckMaxUnsignedZero()
11333 const auto * ArgList = FDecl->getTemplateSpecializationArgs(); in CheckMaxUnsignedZero()