Lines Matching refs:Method

1776   for (const auto *Method : CAT->methods()) {  in DiagnoseClassExtensionDupMethods()  local
1777 const ObjCMethodDecl *&PrevMethod = MethodMap[Method->getSelector()]; in DiagnoseClassExtensionDupMethods()
1779 (PrevMethod->isInstanceMethod() == Method->isInstanceMethod()) && in DiagnoseClassExtensionDupMethods()
1780 !MatchTwoMethodDeclarations(Method, PrevMethod)) { in DiagnoseClassExtensionDupMethods()
1781 Diag(Method->getLocation(), diag::err_duplicate_method_decl) in DiagnoseClassExtensionDupMethods()
1782 << Method->getDeclName(); in DiagnoseClassExtensionDupMethods()
2604 void Sema::CheckConflictingOverridingMethod(ObjCMethodDecl *Method, in CheckConflictingOverridingMethod() argument
2608 CheckMethodOverrideReturn(*this, Method, Overridden, in CheckConflictingOverridingMethod()
2612 for (ObjCMethodDecl::param_iterator IM = Method->param_begin(), in CheckConflictingOverridingMethod()
2613 IF = Overridden->param_begin(), EM = Method->param_end(), in CheckConflictingOverridingMethod()
2616 CheckMethodOverrideParam(*this, Method, Overridden, *IM, *IF, in CheckConflictingOverridingMethod()
2620 if (Method->isVariadic() != Overridden->isVariadic()) { in CheckConflictingOverridingMethod()
2621 Diag(Method->getLocation(), in CheckConflictingOverridingMethod()
3297 static bool isMethodContextSameForKindofLookup(ObjCMethodDecl *Method, in isMethodContextSameForKindofLookup() argument
3299 auto *MethodProtocol = dyn_cast<ObjCProtocolDecl>(Method->getDeclContext()); in isMethodContextSameForKindofLookup()
3311 ObjCInterfaceDecl *MethodInterface = Method->getClassInterface(); in isMethodContextSameForKindofLookup()
3318 ObjCMethodDecl *Method) { in addMethodToGlobalList() argument
3322 dyn_cast<ObjCCategoryDecl>(Method->getDeclContext())) in addMethodToGlobalList()
3328 List->setMethod(Method); in addMethodToGlobalList()
3342 bool SameDeclaration = MatchTwoMethodDeclarations(Method, in addMethodToGlobalList()
3355 !isMethodContextSameForKindofLookup(Method, List->getMethod())) { in addMethodToGlobalList()
3359 if (!Method->isDefined()) in addMethodToGlobalList()
3364 if (Method->isDeprecated() && SameDeclaration && in addMethodToGlobalList()
3368 if (Method->isUnavailable() && SameDeclaration && in addMethodToGlobalList()
3378 if (Method->isDefined()) in addMethodToGlobalList()
3390 if (Method->isDeprecated()) { in addMethodToGlobalList()
3392 List->setMethod(Method); in addMethodToGlobalList()
3396 if (Method->isUnavailable()) { in addMethodToGlobalList()
3398 List->setMethod(Method); in addMethodToGlobalList()
3412 ListWithSameDeclaration->setMethod(Method); in addMethodToGlobalList()
3417 Previous->setNext(new (Mem) ObjCMethodList(Method)); in addMethodToGlobalList()
3433 void Sema::AddMethodToGlobalPool(ObjCMethodDecl *Method, bool impl, in AddMethodToGlobalPool() argument
3436 if (cast<Decl>(Method->getDeclContext())->isInvalidDecl()) in AddMethodToGlobalPool()
3440 ReadMethodPool(Method->getSelector()); in AddMethodToGlobalPool()
3442 GlobalMethodPool::iterator Pos = MethodPool.find(Method->getSelector()); in AddMethodToGlobalPool()
3445 .insert(std::make_pair(Method->getSelector(), in AddMethodToGlobalPool()
3449 Method->setDefined(impl); in AddMethodToGlobalPool()
3452 addMethodToGlobalList(&Entry, Method); in AddMethodToGlobalPool()
3478 static bool FilterMethodsByTypeBound(ObjCMethodDecl *Method, in FilterMethodsByTypeBound() argument
3492 auto *MethodProtocol = dyn_cast<ObjCProtocolDecl>(Method->getDeclContext()); in FilterMethodsByTypeBound()
3499 if (ObjCInterfaceDecl *MethodInterface = Method->getClassInterface()) { in FilterMethodsByTypeBound()
3656 for (const ObjCMethodList *Method = &Methods.first; Method; in LookupImplementedMethodInGlobalPool() local
3657 Method = Method->getNext()) in LookupImplementedMethodInGlobalPool()
3658 if (Method->getMethod() && in LookupImplementedMethodInGlobalPool()
3659 (Method->getMethod()->isDefined() || in LookupImplementedMethodInGlobalPool()
3660 Method->getMethod()->isPropertyAccessor())) in LookupImplementedMethodInGlobalPool()
3661 return Method->getMethod(); in LookupImplementedMethodInGlobalPool()
3663 for (const ObjCMethodList *Method = &Methods.second; Method; in LookupImplementedMethodInGlobalPool() local
3664 Method = Method->getNext()) in LookupImplementedMethodInGlobalPool()
3665 if (Method->getMethod() && in LookupImplementedMethodInGlobalPool()
3666 (Method->getMethod()->isDefined() || in LookupImplementedMethodInGlobalPool()
3667 Method->getMethod()->isPropertyAccessor())) in LookupImplementedMethodInGlobalPool()
3668 return Method->getMethod(); in LookupImplementedMethodInGlobalPool()
3675 StringRef Typo, const ObjCMethodDecl * Method) { in HelperSelectorsForTypoCorrection() argument
3678 std::string MethodName = Method->getSelector().getAsString(); in HelperSelectorsForTypoCorrection()
3688 BestMethod.push_back(Method); in HelperSelectorsForTypoCorrection()
3691 BestMethod.push_back(Method); in HelperSelectorsForTypoCorrection()
4016 ObjCMethodDecl *Method = in ActOnAtEnd() local
4019 if (!Method) continue; // Already issued a diagnostic. in ActOnAtEnd()
4020 if (Method->isInstanceMethod()) { in ActOnAtEnd()
4022 const ObjCMethodDecl *&PrevMethod = InsMap[Method->getSelector()]; in ActOnAtEnd()
4023 bool match = PrevMethod ? MatchTwoMethodDeclarations(Method, PrevMethod) in ActOnAtEnd()
4027 Diag(Method->getLocation(), diag::err_duplicate_method_decl) in ActOnAtEnd()
4028 << Method->getDeclName(); in ActOnAtEnd()
4030 Method->setInvalidDecl(); in ActOnAtEnd()
4033 Method->setAsRedeclaration(PrevMethod); in ActOnAtEnd()
4035 Method->getLocation())) in ActOnAtEnd()
4036 Diag(Method->getLocation(), diag::warn_duplicate_method_decl) in ActOnAtEnd()
4037 << Method->getDeclName(); in ActOnAtEnd()
4040 InsMap[Method->getSelector()] = Method; in ActOnAtEnd()
4042 AddInstanceMethodToGlobalPool(Method); in ActOnAtEnd()
4046 const ObjCMethodDecl *&PrevMethod = ClsMap[Method->getSelector()]; in ActOnAtEnd()
4047 bool match = PrevMethod ? MatchTwoMethodDeclarations(Method, PrevMethod) in ActOnAtEnd()
4051 Diag(Method->getLocation(), diag::err_duplicate_method_decl) in ActOnAtEnd()
4052 << Method->getDeclName(); in ActOnAtEnd()
4054 Method->setInvalidDecl(); in ActOnAtEnd()
4057 Method->setAsRedeclaration(PrevMethod); in ActOnAtEnd()
4059 Method->getLocation())) in ActOnAtEnd()
4060 Diag(Method->getLocation(), diag::warn_duplicate_method_decl) in ActOnAtEnd()
4061 << Method->getDeclName(); in ActOnAtEnd()
4064 ClsMap[Method->getSelector()] = Method; in ActOnAtEnd()
4065 AddFactoryMethodToGlobalPool(Method); in ActOnAtEnd()
4241 CheckRelatedResultTypeCompatibility(Sema &S, ObjCMethodDecl *Method, in CheckRelatedResultTypeCompatibility() argument
4243 QualType ResultType = Method->getReturnType(); in CheckRelatedResultTypeCompatibility()
4281 const ObjCMethodDecl *Method; member in __anon4ea9ea620711::OverrideSearch
4286 OverrideSearch(Sema &S, const ObjCMethodDecl *method) : Method(method) { in OverrideSearch()
4403 ObjCMethodDecl *meth = container->getMethod(Method->getSelector(), in search()
4404 Method->isInstanceMethod(), in search()
4625 const ObjCMethodDecl *Method) { in checkObjCMethodX86VectorTypes() argument
4631 for (const ParmVarDecl *P : Method->parameters()) { in checkObjCMethodX86VectorTypes()
4639 if (Method->getReturnType()->isVectorType()) { in checkObjCMethodX86VectorTypes()
4640 Loc = Method->getReturnTypeSourceRange().getBegin(); in checkObjCMethodX86VectorTypes()
4641 T = Method->getReturnType(); in checkObjCMethodX86VectorTypes()
4660 << T << (Method->getReturnType()->isVectorType() ? /*return value*/ 1 in checkObjCMethodX86VectorTypes()
4665 static void mergeObjCDirectMembers(Sema &S, Decl *CD, ObjCMethodDecl *Method) { in mergeObjCDirectMembers() argument
4666 if (!Method->isDirectMethod() && !Method->hasAttr<UnavailableAttr>() && in mergeObjCDirectMembers()
4668 Method->addAttr( in mergeObjCDirectMembers()
4669 ObjCDirectAttr::CreateImplicit(S.Context, Method->getLocation())); in mergeObjCDirectMembers()
4674 ObjCMethodDecl *Method, in checkObjCDirectMethodClashes() argument
4676 auto Sel = Method->getSelector(); in checkObjCDirectMethodClashes()
4677 bool isInstance = Method->isInstanceMethod(); in checkObjCDirectMethodClashes()
4683 if (Method->isDirectMethod() || IMD->isDirectMethod()) { in checkObjCDirectMethodClashes()
4684 S.Diag(Method->getLocation(), diag::err_objc_direct_duplicate_decl) in checkObjCDirectMethodClashes()
4685 << Method->isDirectMethod() << /* method */ 0 << IMD->isDirectMethod() in checkObjCDirectMethodClashes()
4686 << Method->getDeclName(); in checkObjCDirectMethodClashes()
5278 Sema::GetIvarBackingPropertyAccessor(const ObjCMethodDecl *Method, in GetIvarBackingPropertyAccessor() argument
5280 if (Method->isClassMethod()) in GetIvarBackingPropertyAccessor()
5282 const ObjCInterfaceDecl *IDecl = Method->getClassInterface(); in GetIvarBackingPropertyAccessor()
5285 Method = IDecl->lookupMethod(Method->getSelector(), /*isInstance=*/true, in GetIvarBackingPropertyAccessor()
5288 if (!Method || !Method->isPropertyAccessor()) in GetIvarBackingPropertyAccessor()
5290 if ((PDecl = Method->findPropertyDecl())) in GetIvarBackingPropertyAccessor()
5309 const ObjCMethodDecl *Method; member in __anon4ea9ea620b11::UnusedBackingIvarChecker
5314 UnusedBackingIvarChecker(Sema &S, const ObjCMethodDecl *Method, in UnusedBackingIvarChecker() argument
5316 : S(S), Method(Method), IvarD(IvarD), in UnusedBackingIvarChecker()
5331 S.isSelfExpr(E->getInstanceReceiver(), Method)) { in VisitObjCMessageExpr()