Skip to content

Commit c95d9a3

Browse files
committed
AST: Replace a ProtocolDecl::getSuperclass() call
1 parent 614dd51 commit c95d9a3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/AST/ASTPrinter.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7766,7 +7766,9 @@ static void getSyntacticInheritanceClause(const ProtocolDecl *proto,
77667766
llvm::SmallVectorImpl<InheritedEntry> &Results) {
77677767
auto &ctx = proto->getASTContext();
77687768

7769-
if (auto superclassTy = proto->getSuperclass()) {
7769+
auto genericSig = proto->getGenericSignature();
7770+
if (auto superclassTy = genericSig->getSuperclassBound(
7771+
proto->getSelfInterfaceType())) {
77707772
Results.emplace_back(TypeLoc::withoutLoc(superclassTy),
77717773
/*isUnchecked=*/false,
77727774
/*isRetroactive=*/false,

0 commit comments

Comments
 (0)