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()
3296 static bool isMethodContextSameForKindofLookup(ObjCMethodDecl *Method, in isMethodContextSameForKindofLookup() argument
3298 auto *MethodProtocol = dyn_cast<ObjCProtocolDecl>(Method->getDeclContext()); in isMethodContextSameForKindofLookup()
3310 ObjCInterfaceDecl *MethodInterface = Method->getClassInterface(); in isMethodContextSameForKindofLookup()
3317 ObjCMethodDecl *Method) { in addMethodToGlobalList() argument
3321 dyn_cast<ObjCCategoryDecl>(Method->getDeclContext())) in addMethodToGlobalList()
3327 List->setMethod(Method); in addMethodToGlobalList()
3341 bool SameDeclaration = MatchTwoMethodDeclarations(Method, in addMethodToGlobalList()
3354 !isMethodContextSameForKindofLookup(Method, List->getMethod())) { in addMethodToGlobalList()
3358 if (!Method->isDefined()) in addMethodToGlobalList()
3363 if (Method->isDeprecated() && SameDeclaration && in addMethodToGlobalList()
3367 if (Method->isUnavailable() && SameDeclaration && in addMethodToGlobalList()
3377 if (Method->isDefined()) in addMethodToGlobalList()
3389 if (Method->isDeprecated()) { in addMethodToGlobalList()
3391 List->setMethod(Method); in addMethodToGlobalList()
3395 if (Method->isUnavailable()) { in addMethodToGlobalList()
3397 List->setMethod(Method); in addMethodToGlobalList()
3411 ListWithSameDeclaration->setMethod(Method); in addMethodToGlobalList()
3416 Previous->setNext(new (Mem) ObjCMethodList(Method)); in addMethodToGlobalList()
3432 void Sema::AddMethodToGlobalPool(ObjCMethodDecl *Method, bool impl, in AddMethodToGlobalPool() argument
3435 if (cast<Decl>(Method->getDeclContext())->isInvalidDecl()) in AddMethodToGlobalPool()
3439 ReadMethodPool(Method->getSelector()); in AddMethodToGlobalPool()
3441 GlobalMethodPool::iterator Pos = MethodPool.find(Method->getSelector()); in AddMethodToGlobalPool()
3444 .insert(std::make_pair(Method->getSelector(), in AddMethodToGlobalPool()
3448 Method->setDefined(impl); in AddMethodToGlobalPool()
3451 addMethodToGlobalList(&Entry, Method); in AddMethodToGlobalPool()
3477 static bool FilterMethodsByTypeBound(ObjCMethodDecl *Method, in FilterMethodsByTypeBound() argument
3491 auto *MethodProtocol = dyn_cast<ObjCProtocolDecl>(Method->getDeclContext()); in FilterMethodsByTypeBound()
3498 if (ObjCInterfaceDecl *MethodInterface = Method->getClassInterface()) { in FilterMethodsByTypeBound()
3655 for (const ObjCMethodList *Method = &Methods.first; Method; in LookupImplementedMethodInGlobalPool() local
3656 Method = Method->getNext()) in LookupImplementedMethodInGlobalPool()
3657 if (Method->getMethod() && in LookupImplementedMethodInGlobalPool()
3658 (Method->getMethod()->isDefined() || in LookupImplementedMethodInGlobalPool()
3659 Method->getMethod()->isPropertyAccessor())) in LookupImplementedMethodInGlobalPool()
3660 return Method->getMethod(); in LookupImplementedMethodInGlobalPool()
3662 for (const ObjCMethodList *Method = &Methods.second; Method; in LookupImplementedMethodInGlobalPool() local
3663 Method = Method->getNext()) in LookupImplementedMethodInGlobalPool()
3664 if (Method->getMethod() && in LookupImplementedMethodInGlobalPool()
3665 (Method->getMethod()->isDefined() || in LookupImplementedMethodInGlobalPool()
3666 Method->getMethod()->isPropertyAccessor())) in LookupImplementedMethodInGlobalPool()
3667 return Method->getMethod(); in LookupImplementedMethodInGlobalPool()
3674 StringRef Typo, const ObjCMethodDecl * Method) { in HelperSelectorsForTypoCorrection() argument
3677 std::string MethodName = Method->getSelector().getAsString(); in HelperSelectorsForTypoCorrection()
3687 BestMethod.push_back(Method); in HelperSelectorsForTypoCorrection()
3690 BestMethod.push_back(Method); in HelperSelectorsForTypoCorrection()
4015 ObjCMethodDecl *Method = in ActOnAtEnd() local
4018 if (!Method) continue; // Already issued a diagnostic. in ActOnAtEnd()
4019 if (Method->isInstanceMethod()) { in ActOnAtEnd()
4021 const ObjCMethodDecl *&PrevMethod = InsMap[Method->getSelector()]; in ActOnAtEnd()
4022 bool match = PrevMethod ? MatchTwoMethodDeclarations(Method, PrevMethod) in ActOnAtEnd()
4026 Diag(Method->getLocation(), diag::err_duplicate_method_decl) in ActOnAtEnd()
4027 << Method->getDeclName(); in ActOnAtEnd()
4029 Method->setInvalidDecl(); in ActOnAtEnd()
4032 Method->setAsRedeclaration(PrevMethod); in ActOnAtEnd()
4034 Method->getLocation())) in ActOnAtEnd()
4035 Diag(Method->getLocation(), diag::warn_duplicate_method_decl) in ActOnAtEnd()
4036 << Method->getDeclName(); in ActOnAtEnd()
4039 InsMap[Method->getSelector()] = Method; in ActOnAtEnd()
4041 AddInstanceMethodToGlobalPool(Method); in ActOnAtEnd()
4045 const ObjCMethodDecl *&PrevMethod = ClsMap[Method->getSelector()]; in ActOnAtEnd()
4046 bool match = PrevMethod ? MatchTwoMethodDeclarations(Method, PrevMethod) in ActOnAtEnd()
4050 Diag(Method->getLocation(), diag::err_duplicate_method_decl) in ActOnAtEnd()
4051 << Method->getDeclName(); in ActOnAtEnd()
4053 Method->setInvalidDecl(); in ActOnAtEnd()
4056 Method->setAsRedeclaration(PrevMethod); in ActOnAtEnd()
4058 Method->getLocation())) in ActOnAtEnd()
4059 Diag(Method->getLocation(), diag::warn_duplicate_method_decl) in ActOnAtEnd()
4060 << Method->getDeclName(); in ActOnAtEnd()
4063 ClsMap[Method->getSelector()] = Method; in ActOnAtEnd()
4064 AddFactoryMethodToGlobalPool(Method); in ActOnAtEnd()
4240 CheckRelatedResultTypeCompatibility(Sema &S, ObjCMethodDecl *Method, in CheckRelatedResultTypeCompatibility() argument
4242 QualType ResultType = Method->getReturnType(); in CheckRelatedResultTypeCompatibility()
4280 const ObjCMethodDecl *Method; member in __anond0a619c10711::OverrideSearch
4285 OverrideSearch(Sema &S, const ObjCMethodDecl *method) : Method(method) { in OverrideSearch()
4402 ObjCMethodDecl *meth = container->getMethod(Method->getSelector(), in search()
4403 Method->isInstanceMethod(), in search()
4624 const ObjCMethodDecl *Method) { in checkObjCMethodX86VectorTypes() argument
4630 for (const ParmVarDecl *P : Method->parameters()) { in checkObjCMethodX86VectorTypes()
4638 if (Method->getReturnType()->isVectorType()) { in checkObjCMethodX86VectorTypes()
4639 Loc = Method->getReturnTypeSourceRange().getBegin(); in checkObjCMethodX86VectorTypes()
4640 T = Method->getReturnType(); in checkObjCMethodX86VectorTypes()
4659 << T << (Method->getReturnType()->isVectorType() ? /*return value*/ 1 in checkObjCMethodX86VectorTypes()
4664 static void mergeObjCDirectMembers(Sema &S, Decl *CD, ObjCMethodDecl *Method) { in mergeObjCDirectMembers() argument
4665 if (!Method->isDirectMethod() && !Method->hasAttr<UnavailableAttr>() && in mergeObjCDirectMembers()
4667 Method->addAttr( in mergeObjCDirectMembers()
4668 ObjCDirectAttr::CreateImplicit(S.Context, Method->getLocation())); in mergeObjCDirectMembers()
4673 ObjCMethodDecl *Method, in checkObjCDirectMethodClashes() argument
4675 auto Sel = Method->getSelector(); in checkObjCDirectMethodClashes()
4676 bool isInstance = Method->isInstanceMethod(); in checkObjCDirectMethodClashes()
4682 if (Method->isDirectMethod() || IMD->isDirectMethod()) { in checkObjCDirectMethodClashes()
4683 S.Diag(Method->getLocation(), diag::err_objc_direct_duplicate_decl) in checkObjCDirectMethodClashes()
4684 << Method->isDirectMethod() << /* method */ 0 << IMD->isDirectMethod() in checkObjCDirectMethodClashes()
4685 << 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 __anond0a619c10b11::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()