File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -6608,18 +6608,12 @@ bool ProtocolDecl::walkInheritedProtocols(
6608
6608
bool ProtocolDecl::inheritsFrom (const ProtocolDecl *super) const {
6609
6609
assert (super);
6610
6610
6611
+ // Fast path.
6611
6612
if (this == super)
6612
6613
return false ;
6613
6614
6614
- if (auto ip = super->getInvertibleProtocolKind ())
6615
- return requiresInvertible (*ip);
6616
-
6617
- return walkInheritedProtocols ([super](ProtocolDecl *inherited) {
6618
- if (inherited == super)
6619
- return TypeWalker::Action::Stop;
6620
-
6621
- return TypeWalker::Action::Continue;
6622
- });
6615
+ auto allInherited = getAllInheritedProtocols ();
6616
+ return (llvm::find (allInherited, super) != allInherited.end ());
6623
6617
}
6624
6618
6625
6619
static void findInheritedType (
You can’t perform that action at this time.
0 commit comments