Lines Matching refs:Method

148                                  Selector Sel, const ObjCMethodDecl *Method) {  in validateBoxingMethod()  argument
149 if (!Method) { in validateBoxingMethod()
156 QualType ReturnType = Method->getReturnType(); in validateBoxingMethod()
160 S.Diag(Method->getLocation(), diag::note_objc_literal_method_return) in validateBoxingMethod()
282 ObjCMethodDecl *Method = S.NSNumberDecl->lookupClassMethod(Sel); in getNSNumberFactoryMethod() local
283 if (!Method && S.getLangOpts().DebuggerObjCLiteral) { in getNSNumberFactoryMethod()
286 Method = in getNSNumberFactoryMethod()
294 ParmVarDecl *value = ParmVarDecl::Create(S.Context, Method, in getNSNumberFactoryMethod()
299 Method->setMethodParams(S.Context, value, None); in getNSNumberFactoryMethod()
302 if (!validateBoxingMethod(S, Loc, S.NSNumberDecl, Sel, Method)) in getNSNumberFactoryMethod()
308 S.NSNumberLiteralMethods[*Kind] = Method; in getNSNumberFactoryMethod()
309 return Method; in getNSNumberFactoryMethod()
343 ObjCMethodDecl *Method = getNSNumberFactoryMethod(*this, AtLoc, NumberType, in BuildObjCNumericLiteral() local
345 if (!Method) in BuildObjCNumericLiteral()
349 ParmVarDecl *ParamDecl = Method->parameters()[0]; in BuildObjCNumericLiteral()
361 new (Context) ObjCBoxedExpr(Number, NSNumberPointer, Method, in BuildObjCNumericLiteral()
787 ObjCMethodDecl *Method = NSArrayDecl->lookupClassMethod(Sel); in BuildObjCArrayLiteral() local
788 if (!Method && getLangOpts().DebuggerObjCLiteral) { in BuildObjCArrayLiteral()
790 Method = ObjCMethodDecl::Create( in BuildObjCArrayLiteral()
798 ParmVarDecl *objects = ParmVarDecl::Create(Context, Method, in BuildObjCArrayLiteral()
806 ParmVarDecl *cnt = ParmVarDecl::Create(Context, Method, in BuildObjCArrayLiteral()
814 Method->setMethodParams(Context, Params, None); in BuildObjCArrayLiteral()
817 if (!validateBoxingMethod(*this, Loc, NSArrayDecl, Sel, Method)) in BuildObjCArrayLiteral()
821 QualType T = Method->parameters()[0]->getType(); in BuildObjCArrayLiteral()
827 Diag(Method->parameters()[0]->getLocation(), in BuildObjCArrayLiteral()
835 if (!Method->parameters()[1]->getType()->isIntegerType()) { in BuildObjCArrayLiteral()
838 Diag(Method->parameters()[1]->getLocation(), in BuildObjCArrayLiteral()
841 << Method->parameters()[1]->getType() in BuildObjCArrayLiteral()
847 ArrayWithObjectsMethod = Method; in BuildObjCArrayLiteral()
893 ObjCMethodDecl *Method = NSDictionaryDecl->lookupClassMethod(Sel); in BuildObjCDictionaryLiteral() local
894 if (!Method && getLangOpts().DebuggerObjCLiteral) { in BuildObjCDictionaryLiteral()
895 Method = ObjCMethodDecl::Create(Context, in BuildObjCDictionaryLiteral()
906 ParmVarDecl *objects = ParmVarDecl::Create(Context, Method, in BuildObjCDictionaryLiteral()
914 ParmVarDecl *keys = ParmVarDecl::Create(Context, Method, in BuildObjCDictionaryLiteral()
922 ParmVarDecl *cnt = ParmVarDecl::Create(Context, Method, in BuildObjCDictionaryLiteral()
930 Method->setMethodParams(Context, Params, None); in BuildObjCDictionaryLiteral()
934 Method)) in BuildObjCDictionaryLiteral()
938 QualType ValueT = Method->parameters()[0]->getType(); in BuildObjCDictionaryLiteral()
944 Diag(Method->parameters()[0]->getLocation(), in BuildObjCDictionaryLiteral()
952 QualType KeyT = Method->parameters()[1]->getType(); in BuildObjCDictionaryLiteral()
981 Diag(Method->parameters()[1]->getLocation(), in BuildObjCDictionaryLiteral()
990 QualType CountType = Method->parameters()[2]->getType(); in BuildObjCDictionaryLiteral()
994 Diag(Method->parameters()[2]->getLocation(), in BuildObjCDictionaryLiteral()
1002 DictionaryWithObjectsMethod = Method; in BuildObjCDictionaryLiteral()
1106 ObjCMethodDecl *Method, in HelperToDiagnoseMismatchedMethodsInGlobalPool() argument
1112 if (MatchingMethodDecl == Method || in HelperToDiagnoseMismatchedMethodsInGlobalPool()
1114 MatchingMethodDecl->getSelector() != Method->getSelector()) in HelperToDiagnoseMismatchedMethodsInGlobalPool()
1116 if (!S.MatchTwoMethodDeclarations(Method, in HelperToDiagnoseMismatchedMethodsInGlobalPool()
1121 << Method->getSelector() << FixItHint::CreateInsertion(LParenLoc, "(") in HelperToDiagnoseMismatchedMethodsInGlobalPool()
1123 S.Diag(Method->getLocation(), diag::note_method_declared_at) in HelperToDiagnoseMismatchedMethodsInGlobalPool()
1124 << Method->getDeclName(); in HelperToDiagnoseMismatchedMethodsInGlobalPool()
1134 ObjCMethodDecl *Method, in DiagnoseMismatchedSelectors() argument
1147 Method, InstMethList)) in DiagnoseMismatchedSelectors()
1153 Method, ClsMethList) || Warned) in DiagnoseMismatchedSelectors()
1164 ObjCMethodDecl *Method = LookupInstanceMethodInGlobalPool(Sel, in ParseObjCSelectorExpression() local
1166 if (!Method) in ParseObjCSelectorExpression()
1167 Method = LookupFactoryMethodInGlobalPool(Sel, in ParseObjCSelectorExpression()
1169 if (!Method) { in ParseObjCSelectorExpression()
1181 DiagnoseMismatchedSelectors(*this, AtLoc, Method, LParenLoc, RParenLoc, in ParseObjCSelectorExpression()
1184 if (Method && in ParseObjCSelectorExpression()
1185 Method->getImplementationControl() != ObjCMethodDecl::Optional && in ParseObjCSelectorExpression()
1186 !getSourceManager().isInSystemHeader(Method->getLocation())) in ParseObjCSelectorExpression()
1286 ObjCMethodDecl *Method, in getBaseMessageSendResultType() argument
1289 assert(Method && "Must have a method"); in getBaseMessageSendResultType()
1290 if (!Method->hasRelatedResultType()) in getBaseMessageSendResultType()
1291 return Method->getSendResultType(ReceiverType); in getBaseMessageSendResultType()
1299 if (auto nullability = Method->getSendResultType(ReceiverType) in getBaseMessageSendResultType()
1318 if (Method->isInstanceMethod() && isClassMessage) in getBaseMessageSendResultType()
1320 Method->getSendResultType(ReceiverType)); in getBaseMessageSendResultType()
1341 Method->getSendResultType(ReceiverType)); in getBaseMessageSendResultType()
1351 ObjCMethodDecl *Method, in getMessageSendResultType() argument
1356 Method, in getMessageSendResultType()
1369 QualType T = Method->getSendResultType(ReceiverType); in getMessageSendResultType()
1514 const ObjCMethodDecl *Method = MsgSend->getMethodDecl(); in EmitRelatedResultTypeNote() local
1515 if (!Method) in EmitRelatedResultTypeNote()
1518 if (!Method->hasRelatedResultType()) in EmitRelatedResultTypeNote()
1522 Method->getReturnType().getNonReferenceType(), MsgSend->getType())) in EmitRelatedResultTypeNote()
1525 if (!Context.hasSameUnqualifiedType(Method->getReturnType(), in EmitRelatedResultTypeNote()
1529 Diag(Method->getLocation(), diag::note_related_result_type_inferred) in EmitRelatedResultTypeNote()
1530 << Method->isInstanceMethod() << Method->getSelector() in EmitRelatedResultTypeNote()
1536 Selector Sel, ArrayRef<SourceLocation> SelectorLocs, ObjCMethodDecl *Method, in CheckMessageArgumentTypes() argument
1546 if (!Method) { in CheckMessageArgumentTypes()
1616 ReturnType = getMessageSendResultType(Receiver, ReceiverType, Method, in CheckMessageArgumentTypes()
1618 VK = Expr::getValueKindForType(Method->getReturnType()); in CheckMessageArgumentTypes()
1623 if (Method->param_size() > Sel.getNumArgs()) in CheckMessageArgumentTypes()
1624 NumNamedArgs = Method->param_size(); in CheckMessageArgumentTypes()
1635 = ReceiverType->getObjCSubstitutions(Method->getDeclContext()); in CheckMessageArgumentTypes()
1644 ParmVarDecl *param = Method->parameters()[i]; in CheckMessageArgumentTypes()
1709 if (Method->isVariadic()) { in CheckMessageArgumentTypes()
1725 << Method->getSourceRange() in CheckMessageArgumentTypes()
1731 DiagnoseSentinelCalls(Method, SelLoc, Args); in CheckMessageArgumentTypes()
1735 Method, SelLoc, makeArrayRef(Args.data(), Args.size())); in CheckMessageArgumentTypes()
1742 ObjCMethodDecl *Method = in isSelfExpr() local
1744 return isSelfExpr(RExpr, Method); in isSelfExpr()
2088 ObjCInterfaceOrSuperCCC(ObjCMethodDecl *Method) { in ObjCInterfaceOrSuperCCC() argument
2090 if (Method && Method->getClassInterface()) in ObjCInterfaceOrSuperCCC()
2091 WantObjCSuper = Method->getClassInterface()->getSuperClass(); in ObjCInterfaceOrSuperCCC()
2125 if (ObjCMethodDecl *Method = getCurMethodDecl()) { in getObjCMessageKind() local
2126 if (!Method->getClassInterface()) { in getObjCMessageKind()
2132 if (Method->getClassInterface()->lookupInstanceVariable(Name, in getObjCMessageKind()
2208 ObjCMethodDecl *Method = tryCaptureObjCSelf(SuperLoc); in ActOnSuperMessage() local
2209 if (!Method) { in ActOnSuperMessage()
2214 ObjCInterfaceDecl *Class = Method->getClassInterface(); in ActOnSuperMessage()
2217 << Method->getDeclName(); in ActOnSuperMessage()
2231 if (Method->getSelector() == Sel) in ActOnSuperMessage()
2234 if (Method->isInstanceMethod()) { in ActOnSuperMessage()
2255 ObjCMethodDecl *Method, in BuildClassMessageImplicit() argument
2263 Sel, Method, Loc, Loc, Loc, Args, in BuildClassMessageImplicit()
2312 const ObjCMethodDecl *Method, in checkFoundationAPI() argument
2317 if (Method->getSelector().getMethodFamily() != OMF_performSelector || in checkFoundationAPI()
2348 << Method->getSelector() in checkFoundationAPI()
2362 ObjCMethodDecl *Method, in DiagnoseCStringFormatDirectiveInObjCAPI() argument
2372 else if (Method) { in DiagnoseCStringFormatDirectiveInObjCAPI()
2373 for (const auto *I : Method->specific_attrs<FormatAttr>()) { in DiagnoseCStringFormatDirectiveInObjCAPI()
2390 if (Method) in DiagnoseCStringFormatDirectiveInObjCAPI()
2391 S.Diag(Method->getLocation(), diag::note_method_declared_at) in DiagnoseCStringFormatDirectiveInObjCAPI()
2392 << Method->getDeclName(); in DiagnoseCStringFormatDirectiveInObjCAPI()
2429 ObjCMethodDecl *Method, in BuildClassMessage() argument
2474 if (!Method) { in BuildClassMessage()
2484 Method = LookupFactoryMethodInGlobalPool(Sel, in BuildClassMessage()
2486 if (Method && !getLangOpts().ObjCAutoRefCount) in BuildClassMessage()
2487 Diag(Method->getLocation(), diag::note_method_sent_forward_class) in BuildClassMessage()
2488 << Method->getDeclName(); in BuildClassMessage()
2490 if (!Method) in BuildClassMessage()
2491 Method = Class->lookupClassMethod(Sel); in BuildClassMessage()
2494 if (!Method) in BuildClassMessage()
2495 Method = Class->lookupPrivateClassMethod(Sel); in BuildClassMessage()
2497 if (Method && DiagnoseUseOfDecl(Method, SelectorSlotLocs, in BuildClassMessage()
2510 Method, true, SuperLoc.isValid(), LBracLoc, in BuildClassMessage()
2514 if (Method && !Method->getReturnType()->isVoidType() && in BuildClassMessage()
2515 RequireCompleteType(LBracLoc, Method->getReturnType(), in BuildClassMessage()
2520 if (Method && Method->getMethodFamily() == OMF_initialize) { in BuildClassMessage()
2523 dyn_cast<ObjCInterfaceDecl>(Method->getDeclContext()); in BuildClassMessage()
2526 Diag(Method->getLocation(), diag::note_method_declared_at) in BuildClassMessage()
2527 << Method->getDeclName(); in BuildClassMessage()
2534 Diag(Method->getLocation(), diag::note_method_declared_at) in BuildClassMessage()
2535 << Method->getDeclName(); in BuildClassMessage()
2542 DiagnoseCStringFormatDirectiveInObjCAPI(*this, Method, Sel, Args, NumArgs); in BuildClassMessage()
2550 Method, makeArrayRef(Args, NumArgs), in BuildClassMessage()
2555 Method, makeArrayRef(Args, NumArgs), in BuildClassMessage()
2560 if (Method) in BuildClassMessage()
2561 checkFoundationAPI(*this, SelLoc, Method, makeArrayRef(Args, NumArgs), in BuildClassMessage()
2594 ObjCMethodDecl *Method, in BuildInstanceMessageImplicit() argument
2598 Sel, Method, Loc, Loc, Loc, Args, in BuildInstanceMessageImplicit()
2652 ObjCMethodDecl *Method, in BuildInstanceMessage() argument
2759 if (!Method) { in BuildInstanceMessage()
2774 Method = Methods[0]; in BuildInstanceMessage()
2777 SelectBestMethod(Sel, ArgsIn, Method->isInstanceMethod(), Methods)) in BuildInstanceMessage()
2778 Method = BestMethod; in BuildInstanceMessage()
2780 if (!AreMultipleMethodsInGlobalPool(Sel, Method, in BuildInstanceMessage()
2783 DiagnoseUseOfDecl(Method, SelectorSlotLocs); in BuildInstanceMessage()
2795 Method = LookupMethodInQualifiedType(Sel, QClassTy, false); in BuildInstanceMessage()
2796 if (!Method) { in BuildInstanceMessage()
2797 Method = LookupMethodInQualifiedType(Sel, QClassTy, true); in BuildInstanceMessage()
2799 if (Method && !isMethodDeclaredInRootProtocol(*this, Method)) { in BuildInstanceMessage()
2801 << Method->getSelector() << Sel; in BuildInstanceMessage()
2802 Diag(Method->getLocation(), diag::note_method_declared_at) in BuildInstanceMessage()
2803 << Method->getDeclName(); in BuildInstanceMessage()
2813 Method = ClassDecl->lookupClassMethod(Sel); in BuildInstanceMessage()
2815 if (!Method) in BuildInstanceMessage()
2816 Method = ClassDecl->lookupPrivateClassMethod(Sel); in BuildInstanceMessage()
2818 if (Method && DiagnoseUseOfDecl(Method, SelectorSlotLocs, nullptr, in BuildInstanceMessage()
2823 if (!Method) { in BuildInstanceMessage()
2835 Method = Methods[0]; in BuildInstanceMessage()
2838 if (Method->isInstanceMethod()) { in BuildInstanceMessage()
2840 dyn_cast<ObjCInterfaceDecl>(Method->getDeclContext())) { in BuildInstanceMessage()
2848 SelectBestMethod(Sel, ArgsIn, Method->isInstanceMethod(), in BuildInstanceMessage()
2850 Method = BestMethod; in BuildInstanceMessage()
2864 Method = LookupMethodInQualifiedType(Sel, QIdTy, true); in BuildInstanceMessage()
2865 if (!Method) in BuildInstanceMessage()
2866 Method = LookupMethodInQualifiedType(Sel, QIdTy, false); in BuildInstanceMessage()
2867 if (Method && DiagnoseUseOfDecl(Method, SelectorSlotLocs)) in BuildInstanceMessage()
2891 Method = nullptr; in BuildInstanceMessage()
2893 Method = ClassDecl->lookupInstanceMethod(Sel); in BuildInstanceMessage()
2896 if (!Method) in BuildInstanceMessage()
2898 Method = LookupMethodInQualifiedType(Sel, OCIType, true); in BuildInstanceMessage()
2900 if (!Method) { in BuildInstanceMessage()
2902 Method = ClassDecl->lookupPrivateMethod(Sel); in BuildInstanceMessage()
2904 if (!Method && getLangOpts().ObjCAutoRefCount) { in BuildInstanceMessage()
2911 if (!Method && (!Receiver || !isSelfExpr(Receiver))) { in BuildInstanceMessage()
2923 Method = Methods[0]; in BuildInstanceMessage()
2926 SelectBestMethod(Sel, ArgsIn, Method->isInstanceMethod(), in BuildInstanceMessage()
2928 Method = BestMethod; in BuildInstanceMessage()
2930 AreMultipleMethodsInGlobalPool(Sel, Method, in BuildInstanceMessage()
2935 if (Method && !forwardClass) in BuildInstanceMessage()
2942 if (Method && DiagnoseUseOfDecl(Method, SelectorSlotLocs, forwardClass)) in BuildInstanceMessage()
2954 (Method && Method->getMethodFamily() == OMF_init) in BuildInstanceMessage()
3008 Method, ClassMessage, SuperLoc.isValid(), in BuildInstanceMessage()
3012 if (Method && !Method->getReturnType()->isVoidType() && in BuildInstanceMessage()
3013 RequireCompleteType(LBracLoc, Method->getReturnType(), in BuildInstanceMessage()
3021 (Method ? Method->getMethodFamily() : Sel.getMethodFamily()); in BuildInstanceMessage()
3024 if (Method) in BuildInstanceMessage()
3025 checkInitMethod(Method, ReceiverType); in BuildInstanceMessage()
3048 if (Method && NumArgs >= 1) { in BuildInstanceMessage()
3098 DiagnoseCStringFormatDirectiveInObjCAPI(*this, Method, Sel, Args, NumArgs); in BuildInstanceMessage()
3105 ReceiverType, Sel, SelectorLocs, Method, in BuildInstanceMessage()
3110 Receiver, Sel, SelectorLocs, Method, in BuildInstanceMessage()
3116 if (Method) { in BuildInstanceMessage()
3133 checkFoundationAPI(*this, SelLoc, Method, makeArrayRef(Args, NumArgs), in BuildInstanceMessage()
3158 if (!isImplicit && Method) { in BuildInstanceMessage()
3159 if (const ObjCPropertyDecl *Prop = Method->findPropertyDecl()) { in BuildInstanceMessage()