Lines Matching defs:Method

2128       CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(Fn);
2129 if (Method && !Method->isStatic() &&
2130 !Method->isExplicitObjectMemberFunction()) {
2137 = S.Context.getTypeDeclType(Method->getParent()).getTypePtr();
5653 /// parameter of the given member function (@c Method) from the
5657 Expr::Classification FromClassification, CXXMethodDecl *Method,
5679 if (Method->isExplicitObjectMemberFunction()) {
5681 ExplicitParameterType = Method->getFunctionObjectParameterReferenceType();
5702 Qualifiers Quals = Method->getMethodQualifiers();
5703 if (isa<CXXDestructorDecl>(Method) || Method->isStatic()) {
5762 } else if (!Method->isExplicitObjectMemberFunction()) {
5769 switch (Method->getRefQualifier()) {
5801 ICS.Standard.IsLvalueReference = Method->getRefQualifier() != RQ_RValue;
5805 = (Method->getRefQualifier() == RQ_None);
5810 /// the implicit object parameter for the given Method with the given
5814 CXXMethodDecl *Method) {
5816 QualType ImplicitParamRecordType = Method->getFunctionObjectParameterType();
5821 DestType = Method->getThisType();
5831 Method->getRefQualifier() !=
5839 *this, From->getBeginLoc(), From->getType(), FromClassification, Method,
5840 Method->getParent());
5849 << Method->getDeclName() << FromRecordType << (CVR - 1)
5851 Diag(Method->getLocation(), diag::note_previous_decl)
5852 << Method->getDeclName();
5861 Method->getRefQualifier() == RefQualifierKind::RQ_RValue;
5863 << Method->getDeclName() << FromClassification.isRValue()
5865 Diag(Method->getLocation(), diag::note_previous_decl)
5866 << Method->getDeclName();
5886 PerformObjectMemberConversion(From, Qualifier, FoundDecl, Method);
6372 static bool PrepareExplicitObjectArgument(Sema &S, CXXMethodDecl *Method,
6375 assert(Method->isExplicitObjectMemberFunction() &&
6376 "Method is not an explicit member function");
6380 Expr *This = GetExplicitObjectExpr(S, Object, Method);
6385 Method, Object->getBeginLoc());
6807 if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(Function)) {
6808 if (!isa<CXXConstructorDecl>(Method)) {
6816 AddMethodCandidate(Method, FoundDecl, Method->getParent(), QualType(),
7044 ObjCMethodDecl *Method = Methods[b];
7046 // Method might have more arguments than selector indicates. This is due
7048 if (Method->param_size() > NumNamedArgs)
7049 NumNamedArgs = Method->param_size();
7060 ParmVarDecl *param = Method->parameters()[i];
7094 if (Match && Method->isVariadic()) {
7123 return Method;
7133 CXXMethodDecl *Method = cast<CXXMethodDecl>(Function);
7134 assert(!isa<CXXConstructorDecl>(Method) &&
7136 assert(!Method->isStatic() && "Shouldn't have `this` for static methods!");
7138 ThisArg, /*Qualifier=*/nullptr, Method, Method);
7386 Sema::AddMethodCandidate(CXXMethodDecl *Method, DeclAccessPair FoundDecl,
7396 = dyn_cast<FunctionProtoType>(Method->getType()->getAs<FunctionType>());
7398 assert(!isa<CXXConstructorDecl>(Method) &&
7401 if (!CandidateSet.isNewCandidate(Method, PO))
7407 if (Method->isDefaulted() && Method->isDeleted() &&
7408 Method->isMoveAssignmentOperator())
7419 Candidate.Function = Method;
7421 CandidateSet.getRewriteInfo().getRewriteKind(Method, PO);
7427 (Method->isExplicitObjectMemberFunction() &&
7433 Method->isImplicitObjectMemberFunction();
7436 !IgnoreExplicitObject && Method->isExplicitObjectMemberFunction() ? 1 : 0;
7438 unsigned NumParams = Method->getNumParams() - ExplicitOffset +
7446 shouldEnforceArgLimit(PartialOverloading, Method)) {
7457 unsigned MinRequiredArgs = Method->getMinRequiredArguments() -
7473 else if (Method->isStatic()) {
7489 Method, ActingContext, /*InOverloadResolution=*/true);
7500 Method)) {
7506 if (Method->getTrailingRequiresClause()) {
7508 if (CheckFunctionConstraints(Method, Satisfaction, /*Loc*/ {},
7533 ? Method->getFunctionObjectParameterReferenceType()
7558 CheckEnableIf(Method, CandidateSet.getLocation(), Args, true)) {
7565 if (isNonViableMultiVersionOverload(Method)) {
7735 auto *Method = dyn_cast<CXXMethodDecl>(FD);
7736 bool HasThisConversion = Method && !isa<CXXConstructorDecl>(Method);
7756 Method, ActingContext, /*InOverloadResolution=*/true,
7765 Method && Method->hasCXXExplicitFunctionObjectParameter() ? 1 : 0;
12789 if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(Fn))
12790 if (!Method->isStatic()) {
12886 if (CXXMethodDecl *Method
12891 Method->isStatic() || Method->isExplicitObjectMemberFunction();
12933 if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(Fn)) {
12937 Method->isStatic() || Method->isExplicitObjectMemberFunction();
14092 CXXConversionDecl *Method,
14097 if (Method->isExplicitObjectMemberFunction())
14098 Exp = InitializeExplicitObjectArgument(*this, E, Method);
14101 FoundDecl, Method);
14105 if (Method->getParent()->isLambda() &&
14106 Method->getConversionType()->isBlockPointerType()) {
14125 Exp.get()->getExprLoc(), Exp.get()->getExprLoc(), Method, Exp.get());
14135 QualType ResultType = Method->getReturnType();
14138 if (Method->isExplicitObjectMemberFunction()) {
14140 CreateFunctionRefExpr(*this, Method, FoundDecl, Exp.get(),
14151 NestedNameSpecifierLoc(), SourceLocation(), Method,
14161 if (CheckFunctionCall(Method, CE,
14162 Method->getType()->castAs<FunctionProtoType>()))
14253 if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(FnDecl)) {
14257 if (Method->isExplicitObjectMemberFunction())
14258 InputInit = InitializeExplicitObjectArgument(*this, Input, Method);
14261 Input, /*Qualifier=*/nullptr, Best->FoundDecl, Method);
14625 if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(FnDecl)) {
14631 if (Method->isExplicitObjectMemberFunction()) {
14636 Args[0], /*Qualifier=*/nullptr, Best->FoundDecl, Method);
14689 if (const auto *Method = dyn_cast<CXXMethodDecl>(FnDecl);
14690 Method && Method->isImplicitObjectMemberFunction()) {
14982 Sema &S, SmallVectorImpl<Expr *> &MethodArgs, CXXMethodDecl *Method,
14985 const auto *Proto = Method->getType()->castAs<FunctionProtoType>();
15001 S.Context, Method->getParamDecl(i)),
15007 S.BuildCXXDefaultArgExpr(LParenLoc, Method, Method->getParamDecl(i));
15089 CXXMethodDecl *Method = cast<CXXMethodDecl>(FnDecl);
15093 if (Method->isExplicitObjectMemberFunction()) {
15095 InitializeExplicitObjectArgument(*this, Args[0], Method);
15102 Args[0], /*Qualifier=*/nullptr, Best->FoundDecl, Method);
15110 *this, MethodArgs, Method, ArgExpr, LLoc);
15135 if (CheckFunctionCall(Method, TheCall,
15136 Method->getType()->castAs<FunctionProtoType>()))
15293 CXXMethodDecl *Method = nullptr;
15299 Method = cast<CXXMethodDecl>(MemExpr->getMemberDecl());
15350 } else if ((Method = dyn_cast<CXXMethodDecl>(Func))) {
15356 AddMethodCandidate(Method, I.getPair(), ActingDC, ExplicitObjectType,
15379 Method = cast<CXXMethodDecl>(Best->Function);
15384 // If FoundDecl is different from Method (such as if one is a template
15390 if (Method != FoundDecl.getDecl() &&
15391 DiagnoseUseOfOverloadedDecl(Method, UnresExpr->getNameLoc()))
15422 FixOverloadedFunctionReference(MemExprE, FoundDecl, Method);
15429 if (Method->isStatic()) {
15430 return BuildResolvedCallExpr(MemExprE, Method, LParenLoc, Args, RParenLoc,
15437 QualType ResultType = Method->getReturnType();
15441 assert(Method && "Member call to something that isn't a method?");
15442 const auto *Proto = Method->getType()->castAs<FunctionProtoType>();
15446 if (Method->isExplicitObjectMemberFunction()) {
15447 if (PrepareExplicitObjectArgument(*this, Method, MemExpr->getBase(), Args,
15453 CreateFunctionRefExpr(*this, Method, FoundDecl, MemExpr,
15466 MemExpr->getBase(), Qualifier, FoundDecl, Method);
15476 if (CheckCallReturnType(Method->getReturnType(), MemExpr->getMemberLoc(),
15477 TheCall, Method))
15481 if (ConvertArgumentsForCall(TheCall, MemExpr, Method, Proto, Args,
15485 DiagnoseSentinelCalls(Method, LParenLoc, Args);
15487 if (CheckFunctionCall(Method, TheCall, Proto))
15495 CheckEnableIf(Method, LParenLoc, Args, true)) {
15498 << Method << Method->getSourceRange();
15499 Diag(Method->getLocation(),
15733 CXXMethodDecl *Method = cast<CXXMethodDecl>(Best->Function);
15736 if (Method->isInvalidDecl())
15739 const auto *Proto = Method->getType()->castAs<FunctionProtoType>();
15745 ExprResult NewFn = CreateFunctionRefExpr(*this, Method, Best->FoundDecl,
15759 if (Method->isExplicitObjectMemberFunction()) {
15760 IsError |= PrepareExplicitObjectArgument(*this, Method, Obj, Args, NewArgs);
15763 Object.get(), /*Qualifier=*/nullptr, Best->FoundDecl, Method);
15772 *this, MethodArgs, Method, Args, LParenLoc);
15788 DiagnoseSentinelCalls(Method, LParenLoc, Args);
15791 QualType ResultTy = Method->getReturnType();
15799 if (CheckCallReturnType(Method->getReturnType(), LParenLoc, TheCall, Method))
15802 if (CheckFunctionCall(Method, TheCall, Proto))
15805 return CheckForImmediateInvocation(MaybeBindToTemporary(TheCall), Method);
15899 CXXMethodDecl *Method = cast<CXXMethodDecl>(Best->Function);
15901 if (Method->isExplicitObjectMemberFunction()) {
15902 ExprResult R = InitializeExplicitObjectArgument(*this, Base, Method);
15908 Base, /*Qualifier=*/nullptr, Best->FoundDecl, Method);
15915 ExprResult FnExpr = CreateFunctionRefExpr(*this, Method, Best->FoundDecl,
15920 QualType ResultTy = Method->getReturnType();
15928 if (CheckCallReturnType(Method->getReturnType(), OpLoc, TheCall, Method))
15931 if (CheckFunctionCall(Method, TheCall,
15932 Method->getType()->castAs<FunctionProtoType>()))
15935 return CheckForImmediateInvocation(MaybeBindToTemporary(TheCall), Method);
16142 if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(Fn)) {
16143 if (!Method->isImplicitObjectMemberFunction()) {
16158 SubExpr.get(), Method))
16170 = Context.getTypeDeclType(cast<RecordDecl>(Method->getDeclContext()));