Lines Matching refs:Method

1762   for (const auto *Method : CAT->methods()) {  in DiagnoseClassExtensionDupMethods()  local
1763 const ObjCMethodDecl *&PrevMethod = MethodMap[Method->getSelector()]; in DiagnoseClassExtensionDupMethods()
1765 (PrevMethod->isInstanceMethod() == Method->isInstanceMethod()) && in DiagnoseClassExtensionDupMethods()
1766 !MatchTwoMethodDeclarations(Method, PrevMethod)) { in DiagnoseClassExtensionDupMethods()
1767 Diag(Method->getLocation(), diag::err_duplicate_method_decl) in DiagnoseClassExtensionDupMethods()
1768 << Method->getDeclName(); in DiagnoseClassExtensionDupMethods()
2596 void Sema::CheckConflictingOverridingMethod(ObjCMethodDecl *Method, in CheckConflictingOverridingMethod() argument
2600 CheckMethodOverrideReturn(*this, Method, Overridden, in CheckConflictingOverridingMethod()
2604 for (ObjCMethodDecl::param_iterator IM = Method->param_begin(), in CheckConflictingOverridingMethod()
2605 IF = Overridden->param_begin(), EM = Method->param_end(), in CheckConflictingOverridingMethod()
2608 CheckMethodOverrideParam(*this, Method, Overridden, *IM, *IF, in CheckConflictingOverridingMethod()
2612 if (Method->isVariadic() != Overridden->isVariadic()) { in CheckConflictingOverridingMethod()
2613 Diag(Method->getLocation(), in CheckConflictingOverridingMethod()
3289 static bool isMethodContextSameForKindofLookup(ObjCMethodDecl *Method, in isMethodContextSameForKindofLookup() argument
3291 auto *MethodProtocol = dyn_cast<ObjCProtocolDecl>(Method->getDeclContext()); in isMethodContextSameForKindofLookup()
3303 ObjCInterfaceDecl *MethodInterface = Method->getClassInterface(); in isMethodContextSameForKindofLookup()
3310 ObjCMethodDecl *Method) { in addMethodToGlobalList() argument
3314 dyn_cast<ObjCCategoryDecl>(Method->getDeclContext())) in addMethodToGlobalList()
3320 List->setMethod(Method); in addMethodToGlobalList()
3334 bool SameDeclaration = MatchTwoMethodDeclarations(Method, in addMethodToGlobalList()
3347 !isMethodContextSameForKindofLookup(Method, List->getMethod())) { in addMethodToGlobalList()
3351 if (!Method->isDefined()) in addMethodToGlobalList()
3356 if (Method->isDeprecated() && SameDeclaration && in addMethodToGlobalList()
3360 if (Method->isUnavailable() && SameDeclaration && in addMethodToGlobalList()
3370 if (Method->isDefined()) in addMethodToGlobalList()
3382 if (Method->isDeprecated()) { in addMethodToGlobalList()
3384 List->setMethod(Method); in addMethodToGlobalList()
3388 if (Method->isUnavailable()) { in addMethodToGlobalList()
3390 List->setMethod(Method); in addMethodToGlobalList()
3404 ListWithSameDeclaration->setMethod(Method); in addMethodToGlobalList()
3409 Previous->setNext(new (Mem) ObjCMethodList(Method)); in addMethodToGlobalList()
3425 void Sema::AddMethodToGlobalPool(ObjCMethodDecl *Method, bool impl, in AddMethodToGlobalPool() argument
3428 if (cast<Decl>(Method->getDeclContext())->isInvalidDecl()) in AddMethodToGlobalPool()
3432 ReadMethodPool(Method->getSelector()); in AddMethodToGlobalPool()
3434 GlobalMethodPool::iterator Pos = MethodPool.find(Method->getSelector()); in AddMethodToGlobalPool()
3437 .insert(std::make_pair(Method->getSelector(), in AddMethodToGlobalPool()
3441 Method->setDefined(impl); in AddMethodToGlobalPool()
3444 addMethodToGlobalList(&Entry, Method); in AddMethodToGlobalPool()
3470 static bool FilterMethodsByTypeBound(ObjCMethodDecl *Method, in FilterMethodsByTypeBound() argument
3484 auto *MethodProtocol = dyn_cast<ObjCProtocolDecl>(Method->getDeclContext()); in FilterMethodsByTypeBound()
3491 if (ObjCInterfaceDecl *MethodInterface = Method->getClassInterface()) { in FilterMethodsByTypeBound()
3648 for (const ObjCMethodList *Method = &Methods.first; Method; in LookupImplementedMethodInGlobalPool() local
3649 Method = Method->getNext()) in LookupImplementedMethodInGlobalPool()
3650 if (Method->getMethod() && in LookupImplementedMethodInGlobalPool()
3651 (Method->getMethod()->isDefined() || in LookupImplementedMethodInGlobalPool()
3652 Method->getMethod()->isPropertyAccessor())) in LookupImplementedMethodInGlobalPool()
3653 return Method->getMethod(); in LookupImplementedMethodInGlobalPool()
3655 for (const ObjCMethodList *Method = &Methods.second; 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()
3667 StringRef Typo, const ObjCMethodDecl * Method) { in HelperSelectorsForTypoCorrection() argument
3670 std::string MethodName = Method->getSelector().getAsString(); in HelperSelectorsForTypoCorrection()
3680 BestMethod.push_back(Method); in HelperSelectorsForTypoCorrection()
3683 BestMethod.push_back(Method); in HelperSelectorsForTypoCorrection()
4008 ObjCMethodDecl *Method = in ActOnAtEnd() local
4011 if (!Method) continue; // Already issued a diagnostic. in ActOnAtEnd()
4012 if (Method->isInstanceMethod()) { in ActOnAtEnd()
4014 const ObjCMethodDecl *&PrevMethod = InsMap[Method->getSelector()]; in ActOnAtEnd()
4015 bool match = PrevMethod ? MatchTwoMethodDeclarations(Method, PrevMethod) in ActOnAtEnd()
4019 Diag(Method->getLocation(), diag::err_duplicate_method_decl) in ActOnAtEnd()
4020 << Method->getDeclName(); in ActOnAtEnd()
4022 Method->setInvalidDecl(); in ActOnAtEnd()
4025 Method->setAsRedeclaration(PrevMethod); in ActOnAtEnd()
4027 Method->getLocation())) in ActOnAtEnd()
4028 Diag(Method->getLocation(), diag::warn_duplicate_method_decl) in ActOnAtEnd()
4029 << Method->getDeclName(); in ActOnAtEnd()
4032 InsMap[Method->getSelector()] = Method; in ActOnAtEnd()
4034 AddInstanceMethodToGlobalPool(Method); in ActOnAtEnd()
4038 const ObjCMethodDecl *&PrevMethod = ClsMap[Method->getSelector()]; in ActOnAtEnd()
4039 bool match = PrevMethod ? MatchTwoMethodDeclarations(Method, PrevMethod) in ActOnAtEnd()
4043 Diag(Method->getLocation(), diag::err_duplicate_method_decl) in ActOnAtEnd()
4044 << Method->getDeclName(); in ActOnAtEnd()
4046 Method->setInvalidDecl(); in ActOnAtEnd()
4049 Method->setAsRedeclaration(PrevMethod); in ActOnAtEnd()
4051 Method->getLocation())) in ActOnAtEnd()
4052 Diag(Method->getLocation(), diag::warn_duplicate_method_decl) in ActOnAtEnd()
4053 << Method->getDeclName(); in ActOnAtEnd()
4056 ClsMap[Method->getSelector()] = Method; in ActOnAtEnd()
4057 AddFactoryMethodToGlobalPool(Method); in ActOnAtEnd()
4233 CheckRelatedResultTypeCompatibility(Sema &S, ObjCMethodDecl *Method, in CheckRelatedResultTypeCompatibility() argument
4235 QualType ResultType = Method->getReturnType(); in CheckRelatedResultTypeCompatibility()
4273 const ObjCMethodDecl *Method; member in __anon33d50cbb0711::OverrideSearch
4278 OverrideSearch(Sema &S, const ObjCMethodDecl *method) : Method(method) { in OverrideSearch()
4395 ObjCMethodDecl *meth = container->getMethod(Method->getSelector(), in search()
4396 Method->isInstanceMethod(), in search()
4613 const ObjCMethodDecl *Method) { in checkObjCMethodX86VectorTypes() argument
4619 for (const ParmVarDecl *P : Method->parameters()) { in checkObjCMethodX86VectorTypes()
4627 if (Method->getReturnType()->isVectorType()) { in checkObjCMethodX86VectorTypes()
4628 Loc = Method->getReturnTypeSourceRange().getBegin(); in checkObjCMethodX86VectorTypes()
4629 T = Method->getReturnType(); in checkObjCMethodX86VectorTypes()
4648 << T << (Method->getReturnType()->isVectorType() ? /*return value*/ 1 in checkObjCMethodX86VectorTypes()
4653 static void mergeObjCDirectMembers(Sema &S, Decl *CD, ObjCMethodDecl *Method) { in mergeObjCDirectMembers() argument
4654 if (!Method->isDirectMethod() && !Method->hasAttr<UnavailableAttr>() && in mergeObjCDirectMembers()
4656 Method->addAttr( in mergeObjCDirectMembers()
4657 ObjCDirectAttr::CreateImplicit(S.Context, Method->getLocation())); in mergeObjCDirectMembers()
4662 ObjCMethodDecl *Method, in checkObjCDirectMethodClashes() argument
4664 auto Sel = Method->getSelector(); in checkObjCDirectMethodClashes()
4665 bool isInstance = Method->isInstanceMethod(); in checkObjCDirectMethodClashes()
4671 if (Method->isDirectMethod() || IMD->isDirectMethod()) { in checkObjCDirectMethodClashes()
4672 S.Diag(Method->getLocation(), diag::err_objc_direct_duplicate_decl) in checkObjCDirectMethodClashes()
4673 << Method->isDirectMethod() << /* method */ 0 << IMD->isDirectMethod() in checkObjCDirectMethodClashes()
4674 << Method->getDeclName(); in checkObjCDirectMethodClashes()
5266 Sema::GetIvarBackingPropertyAccessor(const ObjCMethodDecl *Method, in GetIvarBackingPropertyAccessor() argument
5268 if (Method->isClassMethod()) in GetIvarBackingPropertyAccessor()
5270 const ObjCInterfaceDecl *IDecl = Method->getClassInterface(); in GetIvarBackingPropertyAccessor()
5273 Method = IDecl->lookupMethod(Method->getSelector(), /*isInstance=*/true, in GetIvarBackingPropertyAccessor()
5276 if (!Method || !Method->isPropertyAccessor()) in GetIvarBackingPropertyAccessor()
5278 if ((PDecl = Method->findPropertyDecl())) in GetIvarBackingPropertyAccessor()
5297 const ObjCMethodDecl *Method; member in __anon33d50cbb0a11::UnusedBackingIvarChecker
5302 UnusedBackingIvarChecker(Sema &S, const ObjCMethodDecl *Method, in UnusedBackingIvarChecker() argument
5304 : S(S), Method(Method), IvarD(IvarD), in UnusedBackingIvarChecker()
5319 S.isSelfExpr(E->getInstanceReceiver(), Method)) { in VisitObjCMessageExpr()