[CodeCompletion] Use a better API to retrieve

all the protocols a type conform to.

Swift SVN r26694
This commit is contained in:
Xi Ge
2015-03-29 07:08:57 +00:00
parent 3422577752
commit cdf2e853ad

View File

@@ -2013,13 +2013,7 @@ public:
Protocols.end();
};
if (TD->getKind() != DeclKind::Protocol) {
if (ContainsErrorProtocol(TD->getProtocols()))
return true;
auto ExRange = TD->getExtensions();
for (auto It = ExRange.begin(); It != ExRange.end(); ++ It)
if (ContainsErrorProtocol(It->getProtocols()))
return true;
return false;
return ContainsErrorProtocol(TD->getAllProtocols(TypeResolver.get()));
}
}
return false;