Lines Matching refs:Method
1760 for (const auto *Method : CAT->methods()) { in DiagnoseClassExtensionDupMethods() local
1761 const ObjCMethodDecl *&PrevMethod = MethodMap[Method->getSelector()]; in DiagnoseClassExtensionDupMethods()
1763 (PrevMethod->isInstanceMethod() == Method->isInstanceMethod()) && in DiagnoseClassExtensionDupMethods()
1764 !MatchTwoMethodDeclarations(Method, PrevMethod)) { in DiagnoseClassExtensionDupMethods()
1765 Diag(Method->getLocation(), diag::err_duplicate_method_decl) in DiagnoseClassExtensionDupMethods()
1766 << Method->getDeclName(); in DiagnoseClassExtensionDupMethods()
2583 void Sema::CheckConflictingOverridingMethod(ObjCMethodDecl *Method, in CheckConflictingOverridingMethod() argument
2587 CheckMethodOverrideReturn(*this, Method, Overridden, in CheckConflictingOverridingMethod()
2591 for (ObjCMethodDecl::param_iterator IM = Method->param_begin(), in CheckConflictingOverridingMethod()
2592 IF = Overridden->param_begin(), EM = Method->param_end(), in CheckConflictingOverridingMethod()
2595 CheckMethodOverrideParam(*this, Method, Overridden, *IM, *IF, in CheckConflictingOverridingMethod()
2599 if (Method->isVariadic() != Overridden->isVariadic()) { in CheckConflictingOverridingMethod()
2600 Diag(Method->getLocation(), in CheckConflictingOverridingMethod()
3283 static bool isMethodContextSameForKindofLookup(ObjCMethodDecl *Method, in isMethodContextSameForKindofLookup() argument
3285 auto *MethodProtocol = dyn_cast<ObjCProtocolDecl>(Method->getDeclContext()); in isMethodContextSameForKindofLookup()
3297 ObjCInterfaceDecl *MethodInterface = Method->getClassInterface(); in isMethodContextSameForKindofLookup()
3304 ObjCMethodDecl *Method) { in addMethodToGlobalList() argument
3308 dyn_cast<ObjCCategoryDecl>(Method->getDeclContext())) in addMethodToGlobalList()
3314 List->setMethod(Method); in addMethodToGlobalList()
3328 bool SameDeclaration = MatchTwoMethodDeclarations(Method, in addMethodToGlobalList()
3341 !isMethodContextSameForKindofLookup(Method, List->getMethod())) { in addMethodToGlobalList()
3345 if (!Method->isDefined()) in addMethodToGlobalList()
3350 if (Method->isDeprecated() && SameDeclaration && in addMethodToGlobalList()
3354 if (Method->isUnavailable() && SameDeclaration && in addMethodToGlobalList()
3364 if (Method->isDefined()) in addMethodToGlobalList()
3376 if (Method->isDeprecated()) { in addMethodToGlobalList()
3378 List->setMethod(Method); in addMethodToGlobalList()
3382 if (Method->isUnavailable()) { in addMethodToGlobalList()
3384 List->setMethod(Method); in addMethodToGlobalList()
3398 ListWithSameDeclaration->setMethod(Method); in addMethodToGlobalList()
3403 Previous->setNext(new (Mem) ObjCMethodList(Method)); in addMethodToGlobalList()
3419 void Sema::AddMethodToGlobalPool(ObjCMethodDecl *Method, bool impl, in AddMethodToGlobalPool() argument
3422 if (cast<Decl>(Method->getDeclContext())->isInvalidDecl()) in AddMethodToGlobalPool()
3426 ReadMethodPool(Method->getSelector()); in AddMethodToGlobalPool()
3428 GlobalMethodPool::iterator Pos = MethodPool.find(Method->getSelector()); in AddMethodToGlobalPool()
3430 Pos = MethodPool.insert(std::make_pair(Method->getSelector(), in AddMethodToGlobalPool()
3433 Method->setDefined(impl); in AddMethodToGlobalPool()
3436 addMethodToGlobalList(&Entry, Method); in AddMethodToGlobalPool()
3462 static bool FilterMethodsByTypeBound(ObjCMethodDecl *Method, in FilterMethodsByTypeBound() argument
3476 auto *MethodProtocol = dyn_cast<ObjCProtocolDecl>(Method->getDeclContext()); in FilterMethodsByTypeBound()
3483 if (ObjCInterfaceDecl *MethodInterface = Method->getClassInterface()) { in FilterMethodsByTypeBound()
3640 for (const ObjCMethodList *Method = &Methods.first; Method; in LookupImplementedMethodInGlobalPool() local
3641 Method = Method->getNext()) in LookupImplementedMethodInGlobalPool()
3642 if (Method->getMethod() && in LookupImplementedMethodInGlobalPool()
3643 (Method->getMethod()->isDefined() || in LookupImplementedMethodInGlobalPool()
3644 Method->getMethod()->isPropertyAccessor())) in LookupImplementedMethodInGlobalPool()
3645 return Method->getMethod(); in LookupImplementedMethodInGlobalPool()
3647 for (const ObjCMethodList *Method = &Methods.second; Method; in LookupImplementedMethodInGlobalPool() local
3648 Method = Method->getNext()) in LookupImplementedMethodInGlobalPool()
3649 if (Method->getMethod() && in LookupImplementedMethodInGlobalPool()
3650 (Method->getMethod()->isDefined() || in LookupImplementedMethodInGlobalPool()
3651 Method->getMethod()->isPropertyAccessor())) in LookupImplementedMethodInGlobalPool()
3652 return Method->getMethod(); in LookupImplementedMethodInGlobalPool()
3659 StringRef Typo, const ObjCMethodDecl * Method) { in HelperSelectorsForTypoCorrection() argument
3662 std::string MethodName = Method->getSelector().getAsString(); in HelperSelectorsForTypoCorrection()
3672 BestMethod.push_back(Method); in HelperSelectorsForTypoCorrection()
3675 BestMethod.push_back(Method); in HelperSelectorsForTypoCorrection()
4000 ObjCMethodDecl *Method = in ActOnAtEnd() local
4003 if (!Method) continue; // Already issued a diagnostic. in ActOnAtEnd()
4004 if (Method->isInstanceMethod()) { in ActOnAtEnd()
4006 const ObjCMethodDecl *&PrevMethod = InsMap[Method->getSelector()]; in ActOnAtEnd()
4007 bool match = PrevMethod ? MatchTwoMethodDeclarations(Method, PrevMethod) in ActOnAtEnd()
4011 Diag(Method->getLocation(), diag::err_duplicate_method_decl) in ActOnAtEnd()
4012 << Method->getDeclName(); in ActOnAtEnd()
4014 Method->setInvalidDecl(); in ActOnAtEnd()
4017 Method->setAsRedeclaration(PrevMethod); in ActOnAtEnd()
4019 Method->getLocation())) in ActOnAtEnd()
4020 Diag(Method->getLocation(), diag::warn_duplicate_method_decl) in ActOnAtEnd()
4021 << Method->getDeclName(); in ActOnAtEnd()
4024 InsMap[Method->getSelector()] = Method; in ActOnAtEnd()
4026 AddInstanceMethodToGlobalPool(Method); in ActOnAtEnd()
4030 const ObjCMethodDecl *&PrevMethod = ClsMap[Method->getSelector()]; in ActOnAtEnd()
4031 bool match = PrevMethod ? MatchTwoMethodDeclarations(Method, PrevMethod) in ActOnAtEnd()
4035 Diag(Method->getLocation(), diag::err_duplicate_method_decl) in ActOnAtEnd()
4036 << Method->getDeclName(); in ActOnAtEnd()
4038 Method->setInvalidDecl(); in ActOnAtEnd()
4041 Method->setAsRedeclaration(PrevMethod); in ActOnAtEnd()
4043 Method->getLocation())) in ActOnAtEnd()
4044 Diag(Method->getLocation(), diag::warn_duplicate_method_decl) in ActOnAtEnd()
4045 << Method->getDeclName(); in ActOnAtEnd()
4048 ClsMap[Method->getSelector()] = Method; in ActOnAtEnd()
4049 AddFactoryMethodToGlobalPool(Method); in ActOnAtEnd()
4225 CheckRelatedResultTypeCompatibility(Sema &S, ObjCMethodDecl *Method, in CheckRelatedResultTypeCompatibility() argument
4227 QualType ResultType = Method->getReturnType(); in CheckRelatedResultTypeCompatibility()
4265 const ObjCMethodDecl *Method; member in __anon32e380960711::OverrideSearch
4270 OverrideSearch(Sema &S, const ObjCMethodDecl *method) : Method(method) { in OverrideSearch()
4387 ObjCMethodDecl *meth = container->getMethod(Method->getSelector(), in search()
4388 Method->isInstanceMethod(), in search()
4605 const ObjCMethodDecl *Method) { in checkObjCMethodX86VectorTypes() argument
4611 for (const ParmVarDecl *P : Method->parameters()) { in checkObjCMethodX86VectorTypes()
4619 if (Method->getReturnType()->isVectorType()) { in checkObjCMethodX86VectorTypes()
4620 Loc = Method->getReturnTypeSourceRange().getBegin(); in checkObjCMethodX86VectorTypes()
4621 T = Method->getReturnType(); in checkObjCMethodX86VectorTypes()
4640 << T << (Method->getReturnType()->isVectorType() ? /*return value*/ 1 in checkObjCMethodX86VectorTypes()
4645 static void mergeObjCDirectMembers(Sema &S, Decl *CD, ObjCMethodDecl *Method) { in mergeObjCDirectMembers() argument
4646 if (!Method->isDirectMethod() && !Method->hasAttr<UnavailableAttr>() && in mergeObjCDirectMembers()
4648 Method->addAttr( in mergeObjCDirectMembers()
4649 ObjCDirectAttr::CreateImplicit(S.Context, Method->getLocation())); in mergeObjCDirectMembers()
4654 ObjCMethodDecl *Method, in checkObjCDirectMethodClashes() argument
4656 auto Sel = Method->getSelector(); in checkObjCDirectMethodClashes()
4657 bool isInstance = Method->isInstanceMethod(); in checkObjCDirectMethodClashes()
4663 if (Method->isDirectMethod() || IMD->isDirectMethod()) { in checkObjCDirectMethodClashes()
4664 S.Diag(Method->getLocation(), diag::err_objc_direct_duplicate_decl) in checkObjCDirectMethodClashes()
4665 << Method->isDirectMethod() << /* method */ 0 << IMD->isDirectMethod() in checkObjCDirectMethodClashes()
4666 << Method->getDeclName(); in checkObjCDirectMethodClashes()
5258 Sema::GetIvarBackingPropertyAccessor(const ObjCMethodDecl *Method, in GetIvarBackingPropertyAccessor() argument
5260 if (Method->isClassMethod()) in GetIvarBackingPropertyAccessor()
5262 const ObjCInterfaceDecl *IDecl = Method->getClassInterface(); in GetIvarBackingPropertyAccessor()
5265 Method = IDecl->lookupMethod(Method->getSelector(), /*isInstance=*/true, in GetIvarBackingPropertyAccessor()
5268 if (!Method || !Method->isPropertyAccessor()) in GetIvarBackingPropertyAccessor()
5270 if ((PDecl = Method->findPropertyDecl())) in GetIvarBackingPropertyAccessor()
5289 const ObjCMethodDecl *Method; member in __anon32e380960a11::UnusedBackingIvarChecker
5294 UnusedBackingIvarChecker(Sema &S, const ObjCMethodDecl *Method, in UnusedBackingIvarChecker() argument
5296 : S(S), Method(Method), IvarD(IvarD), in UnusedBackingIvarChecker()
5311 S.isSelfExpr(E->getInstanceReceiver(), Method)) { in VisitObjCMessageExpr()