Home | History | Annotate | Download | only in AST

Lines Matching defs:Protocols

1969 /// CollectInheritedProtocols - Collect all protocols in current class and
1972 llvm::SmallPtrSet<ObjCProtocolDecl*, 8> &Protocols) {
1977 CollectInheritedProtocols(Proto, Protocols);
1982 CollectInheritedProtocols(Cat, Protocols);
1986 CollectInheritedProtocols(SD, Protocols);
1990 for (auto *Proto : OC->protocols()) {
1991 CollectInheritedProtocols(Proto, Protocols);
1995 if (!Protocols.insert(
1999 for (auto *Proto : OP->protocols())
2000 CollectInheritedProtocols(Proto, Protocols);
3679 /// CmpProtocolNames - Comparison predicate for sorting protocols
3686 static bool areSortedAndUniqued(ArrayRef<ObjCProtocolDecl *> Protocols) {
3687 if (Protocols.empty()) return true;
3689 if (Protocols[0]->getCanonicalDecl() != Protocols[0])
3692 for (unsigned i = 1; i != Protocols.size(); ++i)
3693 if (CmpProtocolNames(&Protocols[i - 1], &Protocols[i]) >= 0 ||
3694 Protocols[i]->getCanonicalDecl() != Protocols[i])
3700 SortAndUniqueProtocols(SmallVectorImpl<ObjCProtocolDecl *> &Protocols) {
3701 // Sort protocols, keyed by name.
3702 llvm::array_pod_sort(Protocols.begin(), Protocols.end(), CmpProtocolNames);
3705 for (ObjCProtocolDecl *&P : Protocols)
3709 auto ProtocolsEnd = std::unique(Protocols.begin(), Protocols.end());
3710 Protocols.erase(ProtocolsEnd, Protocols.end());
3714 ObjCProtocolDecl * const *Protocols,
3717 llvm::makeArrayRef(Protocols, NumProtocols),
3724 ArrayRef<ObjCProtocolDecl *> protocols,
3726 // If the base type is an interface and there aren't any protocols or
3728 if (typeArgs.empty() && protocols.empty() && !isKindOf &&
3734 ObjCObjectTypeImpl::Profile(ID, baseType, typeArgs, protocols, isKindOf);
3749 // sorted-and-uniqued list of protocols and the type arguments
3757 bool protocolsSorted = areSortedAndUniqued(protocols);
3774 canonProtocolsVec.append(protocols.begin(), protocols.end());
3778 canonProtocols = protocols;
3790 size += protocols.size() * sizeof(ObjCProtocolDecl *);
3793 new (mem) ObjCObjectTypeImpl(canonical, baseType, typeArgs, protocols,
3801 /// ObjCObjectAdoptsQTypeProtocols - Checks that protocols in IC's
3802 /// protocol list adopt all protocols in QT's qualified-id protocol
3820 /// QIdProtocolsAdoptObjCObjectProtocols - Checks that protocols in
3821 /// QT's qualified-id protocol list adopt all protocols in IDecl's list
3822 /// of protocols.
3898 /// specified ObjC interface decl. The list of protocols is optional.
6793 for (auto *PI : rProto->protocols())
6844 // see if static class implements all of id's protocols, directly or
6858 // see if static class implements all of id's protocols, directly or
6872 // see if static class implements all of id's protocols, directly or
6897 // see if static class implements all of id's protocols, directly or
6899 // First, lhs protocols in the qualifier list must be found, direct
6912 // Static class's protocols, or its super class or category protocols
7044 /// Comparison routine for Objective-C protocols to be used with
7053 /// of protocols inherited from two distinct objective-c pointer objects with
7069 // Add all of the protocols for the LHS.
7077 // Also add the protocols associated with the LHS interface.
7088 // Also add the protocols associated with the RHS interface.
7097 // Compute the set of protocols that is implied by either the common type or
7098 // the protocols within the intersection.
7102 // Remove any implied protocols from the list of inherited protocols.
7113 // Sort the remaining protocols by name.
7222 // Compute the intersection of protocols.
7223 SmallVector<ObjCProtocolDecl *, 8> Protocols;
7225 Protocols);
7226 if (!Protocols.empty())
7234 Result = getObjCObjectType(Result, LHSTypeArgs, Protocols,
7273 // Compute the intersection of protocols.
7274 SmallVector<ObjCProtocolDecl *, 8> Protocols;
7276 Protocols);
7277 if (!Protocols.empty())
7284 Result = getObjCObjectType(Result, RHSTypeArgs, Protocols,
7316 // satisfied by the RHS (i.e., the RHS has a superset of the protocols in the
7320 // ; i.e., SuperClass may implement at least one of the protocols
7329 // If there is no protocols associated with RHS, it is not a match.