Lines Matching refs:Method
1750 for (const auto *Method : CAT->methods()) { in DiagnoseClassExtensionDupMethods() local
1751 const ObjCMethodDecl *&PrevMethod = MethodMap[Method->getSelector()]; in DiagnoseClassExtensionDupMethods()
1753 (PrevMethod->isInstanceMethod() == Method->isInstanceMethod()) && in DiagnoseClassExtensionDupMethods()
1754 !MatchTwoMethodDeclarations(Method, PrevMethod)) { in DiagnoseClassExtensionDupMethods()
1755 Diag(Method->getLocation(), diag::err_duplicate_method_decl) in DiagnoseClassExtensionDupMethods()
1756 << Method->getDeclName(); in DiagnoseClassExtensionDupMethods()
2561 void Sema::CheckConflictingOverridingMethod(ObjCMethodDecl *Method, in CheckConflictingOverridingMethod() argument
2565 CheckMethodOverrideReturn(*this, Method, Overridden, in CheckConflictingOverridingMethod()
2569 for (ObjCMethodDecl::param_iterator IM = Method->param_begin(), in CheckConflictingOverridingMethod()
2570 IF = Overridden->param_begin(), EM = Method->param_end(), in CheckConflictingOverridingMethod()
2573 CheckMethodOverrideParam(*this, Method, Overridden, *IM, *IF, in CheckConflictingOverridingMethod()
2577 if (Method->isVariadic() != Overridden->isVariadic()) { in CheckConflictingOverridingMethod()
2578 Diag(Method->getLocation(), in CheckConflictingOverridingMethod()
3249 static bool isMethodContextSameForKindofLookup(ObjCMethodDecl *Method, in isMethodContextSameForKindofLookup() argument
3251 auto *MethodProtocol = dyn_cast<ObjCProtocolDecl>(Method->getDeclContext()); in isMethodContextSameForKindofLookup()
3263 ObjCInterfaceDecl *MethodInterface = Method->getClassInterface(); in isMethodContextSameForKindofLookup()
3270 ObjCMethodDecl *Method) { in addMethodToGlobalList() argument
3274 dyn_cast<ObjCCategoryDecl>(Method->getDeclContext())) in addMethodToGlobalList()
3280 List->setMethod(Method); in addMethodToGlobalList()
3294 bool SameDeclaration = MatchTwoMethodDeclarations(Method, in addMethodToGlobalList()
3307 !isMethodContextSameForKindofLookup(Method, List->getMethod())) { in addMethodToGlobalList()
3311 if (!Method->isDefined()) in addMethodToGlobalList()
3316 if (Method->isDeprecated() && SameDeclaration && in addMethodToGlobalList()
3320 if (Method->isUnavailable() && SameDeclaration && in addMethodToGlobalList()
3330 if (Method->isDefined()) in addMethodToGlobalList()
3342 if (Method->isDeprecated()) { in addMethodToGlobalList()
3344 List->setMethod(Method); in addMethodToGlobalList()
3348 if (Method->isUnavailable()) { in addMethodToGlobalList()
3350 List->setMethod(Method); in addMethodToGlobalList()
3364 ListWithSameDeclaration->setMethod(Method); in addMethodToGlobalList()
3369 Previous->setNext(new (Mem) ObjCMethodList(Method)); in addMethodToGlobalList()
3385 void Sema::AddMethodToGlobalPool(ObjCMethodDecl *Method, bool impl, in AddMethodToGlobalPool() argument
3388 if (cast<Decl>(Method->getDeclContext())->isInvalidDecl()) in AddMethodToGlobalPool()
3392 ReadMethodPool(Method->getSelector()); in AddMethodToGlobalPool()
3394 GlobalMethodPool::iterator Pos = MethodPool.find(Method->getSelector()); in AddMethodToGlobalPool()
3396 Pos = MethodPool.insert(std::make_pair(Method->getSelector(), in AddMethodToGlobalPool()
3399 Method->setDefined(impl); in AddMethodToGlobalPool()
3402 addMethodToGlobalList(&Entry, Method); in AddMethodToGlobalPool()
3425 static bool FilterMethodsByTypeBound(ObjCMethodDecl *Method, in FilterMethodsByTypeBound() argument
3439 auto *MethodProtocol = dyn_cast<ObjCProtocolDecl>(Method->getDeclContext()); in FilterMethodsByTypeBound()
3446 if (ObjCInterfaceDecl *MethodInterface = Method->getClassInterface()) { in FilterMethodsByTypeBound()
3603 for (const ObjCMethodList *Method = &Methods.first; Method; in LookupImplementedMethodInGlobalPool() local
3604 Method = Method->getNext()) in LookupImplementedMethodInGlobalPool()
3605 if (Method->getMethod() && in LookupImplementedMethodInGlobalPool()
3606 (Method->getMethod()->isDefined() || in LookupImplementedMethodInGlobalPool()
3607 Method->getMethod()->isPropertyAccessor())) in LookupImplementedMethodInGlobalPool()
3608 return Method->getMethod(); in LookupImplementedMethodInGlobalPool()
3610 for (const ObjCMethodList *Method = &Methods.second; Method; in LookupImplementedMethodInGlobalPool() local
3611 Method = Method->getNext()) in LookupImplementedMethodInGlobalPool()
3612 if (Method->getMethod() && in LookupImplementedMethodInGlobalPool()
3613 (Method->getMethod()->isDefined() || in LookupImplementedMethodInGlobalPool()
3614 Method->getMethod()->isPropertyAccessor())) in LookupImplementedMethodInGlobalPool()
3615 return Method->getMethod(); in LookupImplementedMethodInGlobalPool()
3622 StringRef Typo, const ObjCMethodDecl * Method) { in HelperSelectorsForTypoCorrection() argument
3625 std::string MethodName = Method->getSelector().getAsString(); in HelperSelectorsForTypoCorrection()
3635 BestMethod.push_back(Method); in HelperSelectorsForTypoCorrection()
3638 BestMethod.push_back(Method); in HelperSelectorsForTypoCorrection()
3899 ObjCMethodDecl *Method = in ActOnAtEnd() local
3902 if (!Method) continue; // Already issued a diagnostic. in ActOnAtEnd()
3903 if (Method->isInstanceMethod()) { in ActOnAtEnd()
3905 const ObjCMethodDecl *&PrevMethod = InsMap[Method->getSelector()]; in ActOnAtEnd()
3906 bool match = PrevMethod ? MatchTwoMethodDeclarations(Method, PrevMethod) in ActOnAtEnd()
3910 Diag(Method->getLocation(), diag::err_duplicate_method_decl) in ActOnAtEnd()
3911 << Method->getDeclName(); in ActOnAtEnd()
3913 Method->setInvalidDecl(); in ActOnAtEnd()
3916 Method->setAsRedeclaration(PrevMethod); in ActOnAtEnd()
3918 Method->getLocation())) in ActOnAtEnd()
3919 Diag(Method->getLocation(), diag::warn_duplicate_method_decl) in ActOnAtEnd()
3920 << Method->getDeclName(); in ActOnAtEnd()
3923 InsMap[Method->getSelector()] = Method; in ActOnAtEnd()
3925 AddInstanceMethodToGlobalPool(Method); in ActOnAtEnd()
3929 const ObjCMethodDecl *&PrevMethod = ClsMap[Method->getSelector()]; in ActOnAtEnd()
3930 bool match = PrevMethod ? MatchTwoMethodDeclarations(Method, PrevMethod) in ActOnAtEnd()
3934 Diag(Method->getLocation(), diag::err_duplicate_method_decl) in ActOnAtEnd()
3935 << Method->getDeclName(); in ActOnAtEnd()
3937 Method->setInvalidDecl(); in ActOnAtEnd()
3940 Method->setAsRedeclaration(PrevMethod); in ActOnAtEnd()
3942 Method->getLocation())) in ActOnAtEnd()
3943 Diag(Method->getLocation(), diag::warn_duplicate_method_decl) in ActOnAtEnd()
3944 << Method->getDeclName(); in ActOnAtEnd()
3947 ClsMap[Method->getSelector()] = Method; in ActOnAtEnd()
3948 AddFactoryMethodToGlobalPool(Method); in ActOnAtEnd()
4115 CheckRelatedResultTypeCompatibility(Sema &S, ObjCMethodDecl *Method, in CheckRelatedResultTypeCompatibility() argument
4117 QualType ResultType = Method->getReturnType(); in CheckRelatedResultTypeCompatibility()
4156 ObjCMethodDecl *Method; member in __anon310a6f9a0711::OverrideSearch
4161 OverrideSearch(Sema &S, ObjCMethodDecl *method) : S(S), Method(method) { in OverrideSearch()
4278 ObjCMethodDecl *meth = container->getMethod(Method->getSelector(), in search()
4279 Method->isInstanceMethod(), in search()
4484 const ObjCMethodDecl *Method) { in checkObjCMethodX86VectorTypes() argument
4490 for (const ParmVarDecl *P : Method->parameters()) { in checkObjCMethodX86VectorTypes()
4498 if (Method->getReturnType()->isVectorType()) { in checkObjCMethodX86VectorTypes()
4499 Loc = Method->getReturnTypeSourceRange().getBegin(); in checkObjCMethodX86VectorTypes()
4500 T = Method->getReturnType(); in checkObjCMethodX86VectorTypes()
4519 << T << (Method->getReturnType()->isVectorType() ? /*return value*/ 1 in checkObjCMethodX86VectorTypes()
4974 Sema::GetIvarBackingPropertyAccessor(const ObjCMethodDecl *Method, in GetIvarBackingPropertyAccessor() argument
4976 if (Method->isClassMethod()) in GetIvarBackingPropertyAccessor()
4978 const ObjCInterfaceDecl *IDecl = Method->getClassInterface(); in GetIvarBackingPropertyAccessor()
4981 Method = IDecl->lookupMethod(Method->getSelector(), /*isInstance=*/true, in GetIvarBackingPropertyAccessor()
4984 if (!Method || !Method->isPropertyAccessor()) in GetIvarBackingPropertyAccessor()
4986 if ((PDecl = Method->findPropertyDecl())) in GetIvarBackingPropertyAccessor()
5005 const ObjCMethodDecl *Method; member in __anon310a6f9a0811::UnusedBackingIvarChecker
5010 UnusedBackingIvarChecker(Sema &S, const ObjCMethodDecl *Method, in UnusedBackingIvarChecker() argument
5012 : S(S), Method(Method), IvarD(IvarD), in UnusedBackingIvarChecker()
5027 S.isSelfExpr(E->getInstanceReceiver(), Method)) { in VisitObjCMessageExpr()