Lines Matching refs:Method

322               ? /*Method*/ 0
1772 for (const auto *Method : CAT->methods()) {
1773 const ObjCMethodDecl *&PrevMethod = MethodMap[Method->getSelector()];
1775 (PrevMethod->isInstanceMethod() == Method->isInstanceMethod()) &&
1776 !MatchTwoMethodDeclarations(Method, PrevMethod)) {
1777 Diag(Method->getLocation(), diag::err_duplicate_method_decl)
1778 << Method->getDeclName();
2609 void SemaObjC::CheckConflictingOverridingMethod(ObjCMethodDecl *Method,
2613 CheckMethodOverrideReturn(SemaRef, Method, Overridden, IsProtocolMethodDecl,
2616 for (ObjCMethodDecl::param_iterator IM = Method->param_begin(),
2617 IF = Overridden->param_begin(), EM = Method->param_end(),
2620 CheckMethodOverrideParam(SemaRef, Method, Overridden, *IM, *IF,
2624 if (Method->isVariadic() != Overridden->isVariadic()) {
2625 Diag(Method->getLocation(),
2749 // implemented in the class, we should not issue "Method definition not
2787 // Ugly, but necessary. Method declared in protocol might have
3297 static bool isMethodContextSameForKindofLookup(ObjCMethodDecl *Method,
3299 auto *MethodProtocol = dyn_cast<ObjCProtocolDecl>(Method->getDeclContext());
3311 ObjCInterfaceDecl *MethodInterface = Method->getClassInterface();
3318 ObjCMethodDecl *Method) {
3322 dyn_cast<ObjCCategoryDecl>(Method->getDeclContext()))
3328 List->setMethod(Method);
3342 bool SameDeclaration = MatchTwoMethodDeclarations(Method,
3355 !isMethodContextSameForKindofLookup(Method, List->getMethod())) {
3359 if (!Method->isDefined())
3364 if (Method->isDeprecated() && SameDeclaration &&
3368 if (Method->isUnavailable() && SameDeclaration &&
3378 if (Method->isDefined())
3382 // @implementation. So if Method is not defined and there already is
3383 // an entry for this type signature, Method has to be for a different
3390 if (Method->isDeprecated()) {
3392 List->setMethod(Method);
3396 if (Method->isUnavailable()) {
3398 List->setMethod(Method);
3412 ListWithSameDeclaration->setMethod(Method);
3417 Previous->setNext(new (Mem) ObjCMethodList(Method));
3433 void SemaObjC::AddMethodToGlobalPool(ObjCMethodDecl *Method, bool impl,
3436 if (cast<Decl>(Method->getDeclContext())->isInvalidDecl())
3440 ReadMethodPool(Method->getSelector());
3442 auto &Lists = MethodPool[Method->getSelector()];
3444 Method->setDefined(impl);
3447 addMethodToGlobalList(&Entry, Method);
3473 static bool FilterMethodsByTypeBound(ObjCMethodDecl *Method,
3485 // Check if the Method belongs to a protocol. We should allow any method
3487 auto *MethodProtocol = dyn_cast<ObjCProtocolDecl>(Method->getDeclContext());
3492 // If the Method belongs to a class, check if it belongs to the class
3494 if (ObjCInterfaceDecl *MethodInterface = Method->getClassInterface()) {
3651 for (const ObjCMethodList *Method = &Methods.first; Method;
3652 Method = Method->getNext())
3653 if (Method->getMethod() &&
3654 (Method->getMethod()->isDefined() ||
3655 Method->getMethod()->isPropertyAccessor()))
3656 return Method->getMethod();
3658 for (const ObjCMethodList *Method = &Methods.second; Method;
3659 Method = Method->getNext())
3660 if (Method->getMethod() &&
3661 (Method->getMethod()->isDefined() ||
3662 Method->getMethod()->isPropertyAccessor()))
3663 return Method->getMethod();
3670 StringRef Typo, const ObjCMethodDecl * Method) {
3673 std::string MethodName = Method->getSelector().getAsString();
3683 BestMethod.push_back(Method);
3686 BestMethod.push_back(Method);
4013 ObjCMethodDecl *Method =
4016 if (!Method) continue; // Already issued a diagnostic.
4017 if (Method->isInstanceMethod()) {
4019 const ObjCMethodDecl *&PrevMethod = InsMap[Method->getSelector()];
4020 bool match = PrevMethod ? MatchTwoMethodDeclarations(Method, PrevMethod)
4024 Diag(Method->getLocation(), diag::err_duplicate_method_decl)
4025 << Method->getDeclName();
4027 Method->setInvalidDecl();
4030 Method->setAsRedeclaration(PrevMethod);
4032 Method->getLocation()))
4033 Diag(Method->getLocation(), diag::warn_duplicate_method_decl)
4034 << Method->getDeclName();
4037 InsMap[Method->getSelector()] = Method;
4039 AddInstanceMethodToGlobalPool(Method);
4043 const ObjCMethodDecl *&PrevMethod = ClsMap[Method->getSelector()];
4044 bool match = PrevMethod ? MatchTwoMethodDeclarations(Method, PrevMethod)
4048 Diag(Method->getLocation(), diag::err_duplicate_method_decl)
4049 << Method->getDeclName();
4051 Method->setInvalidDecl();
4054 Method->setAsRedeclaration(PrevMethod);
4056 Method->getLocation()))
4057 Diag(Method->getLocation(), diag::warn_duplicate_method_decl)
4058 << Method->getDeclName();
4061 ClsMap[Method->getSelector()] = Method;
4062 AddFactoryMethodToGlobalPool(Method);
4239 CheckRelatedResultTypeCompatibility(Sema &S, ObjCMethodDecl *Method,
4241 QualType ResultType = Method->getReturnType();
4279 const ObjCMethodDecl *Method;
4284 OverrideSearch(Sema &S, const ObjCMethodDecl *method) : Method(method) {
4402 ObjCMethodDecl *meth = container->getMethod(Method->getSelector(),
4403 Method->isInstanceMethod(),
4623 const ObjCMethodDecl *Method) {
4629 for (const ParmVarDecl *P : Method->parameters()) {
4637 if (Method->getReturnType()->isVectorType()) {
4638 Loc = Method->getReturnTypeSourceRange().getBegin();
4639 T = Method->getReturnType();
4658 << T << (Method->getReturnType()->isVectorType() ? /*return value*/ 1
4663 static void mergeObjCDirectMembers(Sema &S, Decl *CD, ObjCMethodDecl *Method) {
4664 if (!Method->isDirectMethod() && !Method->hasAttr<UnavailableAttr>() &&
4666 Method->addAttr(
4667 ObjCDirectAttr::CreateImplicit(S.Context, Method->getLocation()));
4672 ObjCMethodDecl *Method,
4674 auto Sel = Method->getSelector();
4675 bool isInstance = Method->isInstanceMethod();
4681 if (Method->isDirectMethod() || IMD->isDirectMethod()) {
4682 S.Diag(Method->getLocation(), diag::err_objc_direct_duplicate_decl)
4683 << Method->isDirectMethod() << /* method */ 0 << IMD->isDirectMethod()
4684 << Method->getDeclName();
5291 SemaObjC::GetIvarBackingPropertyAccessor(const ObjCMethodDecl *Method,
5293 if (Method->isClassMethod())
5295 const ObjCInterfaceDecl *IDecl = Method->getClassInterface();
5298 Method = IDecl->lookupMethod(Method->getSelector(), /*isInstance=*/true,
5301 if (!Method || !Method->isPropertyAccessor())
5303 if ((PDecl = Method->findPropertyDecl()))
5321 const ObjCMethodDecl *Method;
5326 UnusedBackingIvarChecker(Sema &S, const ObjCMethodDecl *Method,
5328 : S(S), Method(Method), IvarD(IvarD), AccessedIvar(false),
5343 S.ObjC().isSelfExpr(E->getInstanceReceiver(), Method)) {