Lines Matching refs:Method

1773   for (const auto *Method : CAT->methods()) {  in DiagnoseClassExtensionDupMethods()  local
1774 const ObjCMethodDecl *&PrevMethod = MethodMap[Method->getSelector()]; in DiagnoseClassExtensionDupMethods()
1776 (PrevMethod->isInstanceMethod() == Method->isInstanceMethod()) && in DiagnoseClassExtensionDupMethods()
1777 !MatchTwoMethodDeclarations(Method, PrevMethod)) { in DiagnoseClassExtensionDupMethods()
1778 Diag(Method->getLocation(), diag::err_duplicate_method_decl) in DiagnoseClassExtensionDupMethods()
1779 << Method->getDeclName(); in DiagnoseClassExtensionDupMethods()
2611 void SemaObjC::CheckConflictingOverridingMethod(ObjCMethodDecl *Method, in CheckConflictingOverridingMethod() argument
2615 CheckMethodOverrideReturn(SemaRef, Method, Overridden, IsProtocolMethodDecl, in CheckConflictingOverridingMethod()
2618 for (ObjCMethodDecl::param_iterator IM = Method->param_begin(), in CheckConflictingOverridingMethod()
2619 IF = Overridden->param_begin(), EM = Method->param_end(), in CheckConflictingOverridingMethod()
2622 CheckMethodOverrideParam(SemaRef, Method, Overridden, *IM, *IF, in CheckConflictingOverridingMethod()
2626 if (Method->isVariadic() != Overridden->isVariadic()) { in CheckConflictingOverridingMethod()
2627 Diag(Method->getLocation(), in CheckConflictingOverridingMethod()
3299 static bool isMethodContextSameForKindofLookup(ObjCMethodDecl *Method, in isMethodContextSameForKindofLookup() argument
3301 auto *MethodProtocol = dyn_cast<ObjCProtocolDecl>(Method->getDeclContext()); in isMethodContextSameForKindofLookup()
3313 ObjCInterfaceDecl *MethodInterface = Method->getClassInterface(); in isMethodContextSameForKindofLookup()
3320 ObjCMethodDecl *Method) { in addMethodToGlobalList() argument
3324 dyn_cast<ObjCCategoryDecl>(Method->getDeclContext())) in addMethodToGlobalList()
3330 List->setMethod(Method); in addMethodToGlobalList()
3344 bool SameDeclaration = MatchTwoMethodDeclarations(Method, in addMethodToGlobalList()
3357 !isMethodContextSameForKindofLookup(Method, List->getMethod())) { in addMethodToGlobalList()
3361 if (!Method->isDefined()) in addMethodToGlobalList()
3366 if (Method->isDeprecated() && SameDeclaration && in addMethodToGlobalList()
3370 if (Method->isUnavailable() && SameDeclaration && in addMethodToGlobalList()
3380 if (Method->isDefined()) in addMethodToGlobalList()
3392 if (Method->isDeprecated()) { in addMethodToGlobalList()
3394 List->setMethod(Method); in addMethodToGlobalList()
3398 if (Method->isUnavailable()) { in addMethodToGlobalList()
3400 List->setMethod(Method); in addMethodToGlobalList()
3414 ListWithSameDeclaration->setMethod(Method); in addMethodToGlobalList()
3419 Previous->setNext(new (Mem) ObjCMethodList(Method)); in addMethodToGlobalList()
3435 void SemaObjC::AddMethodToGlobalPool(ObjCMethodDecl *Method, bool impl, in AddMethodToGlobalPool() argument
3438 if (cast<Decl>(Method->getDeclContext())->isInvalidDecl()) in AddMethodToGlobalPool()
3442 ReadMethodPool(Method->getSelector()); in AddMethodToGlobalPool()
3444 GlobalMethodPool::iterator Pos = MethodPool.find(Method->getSelector()); in AddMethodToGlobalPool()
3447 .insert(std::make_pair(Method->getSelector(), in AddMethodToGlobalPool()
3451 Method->setDefined(impl); in AddMethodToGlobalPool()
3454 addMethodToGlobalList(&Entry, Method); in AddMethodToGlobalPool()
3480 static bool FilterMethodsByTypeBound(ObjCMethodDecl *Method, in FilterMethodsByTypeBound() argument
3494 auto *MethodProtocol = dyn_cast<ObjCProtocolDecl>(Method->getDeclContext()); in FilterMethodsByTypeBound()
3501 if (ObjCInterfaceDecl *MethodInterface = Method->getClassInterface()) { in FilterMethodsByTypeBound()
3658 for (const ObjCMethodList *Method = &Methods.first; Method; in LookupImplementedMethodInGlobalPool() local
3659 Method = Method->getNext()) in LookupImplementedMethodInGlobalPool()
3660 if (Method->getMethod() && in LookupImplementedMethodInGlobalPool()
3661 (Method->getMethod()->isDefined() || in LookupImplementedMethodInGlobalPool()
3662 Method->getMethod()->isPropertyAccessor())) in LookupImplementedMethodInGlobalPool()
3663 return Method->getMethod(); in LookupImplementedMethodInGlobalPool()
3665 for (const ObjCMethodList *Method = &Methods.second; Method; in LookupImplementedMethodInGlobalPool() local
3666 Method = Method->getNext()) in LookupImplementedMethodInGlobalPool()
3667 if (Method->getMethod() && in LookupImplementedMethodInGlobalPool()
3668 (Method->getMethod()->isDefined() || in LookupImplementedMethodInGlobalPool()
3669 Method->getMethod()->isPropertyAccessor())) in LookupImplementedMethodInGlobalPool()
3670 return Method->getMethod(); in LookupImplementedMethodInGlobalPool()
3677 StringRef Typo, const ObjCMethodDecl * Method) { in HelperSelectorsForTypoCorrection() argument
3680 std::string MethodName = Method->getSelector().getAsString(); in HelperSelectorsForTypoCorrection()
3690 BestMethod.push_back(Method); in HelperSelectorsForTypoCorrection()
3693 BestMethod.push_back(Method); in HelperSelectorsForTypoCorrection()
4020 ObjCMethodDecl *Method = in ActOnAtEnd() local
4023 if (!Method) continue; // Already issued a diagnostic. in ActOnAtEnd()
4024 if (Method->isInstanceMethod()) { in ActOnAtEnd()
4026 const ObjCMethodDecl *&PrevMethod = InsMap[Method->getSelector()]; in ActOnAtEnd()
4027 bool match = PrevMethod ? MatchTwoMethodDeclarations(Method, PrevMethod) in ActOnAtEnd()
4031 Diag(Method->getLocation(), diag::err_duplicate_method_decl) in ActOnAtEnd()
4032 << Method->getDeclName(); in ActOnAtEnd()
4034 Method->setInvalidDecl(); in ActOnAtEnd()
4037 Method->setAsRedeclaration(PrevMethod); in ActOnAtEnd()
4039 Method->getLocation())) in ActOnAtEnd()
4040 Diag(Method->getLocation(), diag::warn_duplicate_method_decl) in ActOnAtEnd()
4041 << Method->getDeclName(); in ActOnAtEnd()
4044 InsMap[Method->getSelector()] = Method; in ActOnAtEnd()
4046 AddInstanceMethodToGlobalPool(Method); in ActOnAtEnd()
4050 const ObjCMethodDecl *&PrevMethod = ClsMap[Method->getSelector()]; in ActOnAtEnd()
4051 bool match = PrevMethod ? MatchTwoMethodDeclarations(Method, PrevMethod) in ActOnAtEnd()
4055 Diag(Method->getLocation(), diag::err_duplicate_method_decl) in ActOnAtEnd()
4056 << Method->getDeclName(); in ActOnAtEnd()
4058 Method->setInvalidDecl(); in ActOnAtEnd()
4061 Method->setAsRedeclaration(PrevMethod); in ActOnAtEnd()
4063 Method->getLocation())) in ActOnAtEnd()
4064 Diag(Method->getLocation(), diag::warn_duplicate_method_decl) in ActOnAtEnd()
4065 << Method->getDeclName(); in ActOnAtEnd()
4068 ClsMap[Method->getSelector()] = Method; in ActOnAtEnd()
4069 AddFactoryMethodToGlobalPool(Method); in ActOnAtEnd()
4246 CheckRelatedResultTypeCompatibility(Sema &S, ObjCMethodDecl *Method, in CheckRelatedResultTypeCompatibility() argument
4248 QualType ResultType = Method->getReturnType(); in CheckRelatedResultTypeCompatibility()
4286 const ObjCMethodDecl *Method; member in __anondc01098b0711::OverrideSearch
4291 OverrideSearch(Sema &S, const ObjCMethodDecl *method) : Method(method) { in OverrideSearch()
4409 ObjCMethodDecl *meth = container->getMethod(Method->getSelector(), in search()
4410 Method->isInstanceMethod(), in search()
4632 const ObjCMethodDecl *Method) { in checkObjCMethodX86VectorTypes() argument
4638 for (const ParmVarDecl *P : Method->parameters()) { in checkObjCMethodX86VectorTypes()
4646 if (Method->getReturnType()->isVectorType()) { in checkObjCMethodX86VectorTypes()
4647 Loc = Method->getReturnTypeSourceRange().getBegin(); in checkObjCMethodX86VectorTypes()
4648 T = Method->getReturnType(); in checkObjCMethodX86VectorTypes()
4667 << T << (Method->getReturnType()->isVectorType() ? /*return value*/ 1 in checkObjCMethodX86VectorTypes()
4672 static void mergeObjCDirectMembers(Sema &S, Decl *CD, ObjCMethodDecl *Method) { in mergeObjCDirectMembers() argument
4673 if (!Method->isDirectMethod() && !Method->hasAttr<UnavailableAttr>() && in mergeObjCDirectMembers()
4675 Method->addAttr( in mergeObjCDirectMembers()
4676 ObjCDirectAttr::CreateImplicit(S.Context, Method->getLocation())); in mergeObjCDirectMembers()
4681 ObjCMethodDecl *Method, in checkObjCDirectMethodClashes() argument
4683 auto Sel = Method->getSelector(); in checkObjCDirectMethodClashes()
4684 bool isInstance = Method->isInstanceMethod(); in checkObjCDirectMethodClashes()
4690 if (Method->isDirectMethod() || IMD->isDirectMethod()) { in checkObjCDirectMethodClashes()
4691 S.Diag(Method->getLocation(), diag::err_objc_direct_duplicate_decl) in checkObjCDirectMethodClashes()
4692 << Method->isDirectMethod() << /* method */ 0 << IMD->isDirectMethod() in checkObjCDirectMethodClashes()
4693 << Method->getDeclName(); in checkObjCDirectMethodClashes()
5296 SemaObjC::GetIvarBackingPropertyAccessor(const ObjCMethodDecl *Method, in GetIvarBackingPropertyAccessor() argument
5298 if (Method->isClassMethod()) in GetIvarBackingPropertyAccessor()
5300 const ObjCInterfaceDecl *IDecl = Method->getClassInterface(); in GetIvarBackingPropertyAccessor()
5303 Method = IDecl->lookupMethod(Method->getSelector(), /*isInstance=*/true, in GetIvarBackingPropertyAccessor()
5306 if (!Method || !Method->isPropertyAccessor()) in GetIvarBackingPropertyAccessor()
5308 if ((PDecl = Method->findPropertyDecl())) in GetIvarBackingPropertyAccessor()
5327 const ObjCMethodDecl *Method; member in __anondc01098b0b11::UnusedBackingIvarChecker
5332 UnusedBackingIvarChecker(Sema &S, const ObjCMethodDecl *Method, in UnusedBackingIvarChecker() argument
5334 : S(S), Method(Method), IvarD(IvarD), AccessedIvar(false), in UnusedBackingIvarChecker()
5349 S.ObjC().isSelfExpr(E->getInstanceReceiver(), Method)) { in VisitObjCMessageExpr()