Lines Matching defs:Method

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