Skip to content

Commit d2bd028

Browse files
authored
Merge pull request #59673 from beccadax/what-is-the-protocol-for-generating-sendable-5.7
[5.7] Ignore Sendable conformances in PrintAsClang
2 parents fc4f64c + 440ad75 commit d2bd028

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/PrintAsClang/ModuleContentsWriter.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,10 @@ class ModuleWriter {
419419
bool allRequirementsSatisfied = true;
420420

421421
for (auto proto : PD->getInheritedProtocols()) {
422-
assert(proto->isObjC());
423-
allRequirementsSatisfied &= require(proto);
422+
if (printer.shouldInclude(proto)) {
423+
assert(proto->isObjC());
424+
allRequirementsSatisfied &= require(proto);
425+
}
424426
}
425427

426428
if (!allRequirementsSatisfied)

test/PrintAsObjC/protocols.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import objc_generics
2525

2626
// CHECK-LABEL: @protocol B <A>
2727
// CHECK-NEXT: @end
28-
@objc protocol B : A {}
28+
@objc protocol B : A, Sendable {}
2929

3030
// CHECK-LABEL: @protocol CompletionAndAsync
3131
// CHECK-NEXT: - (void)helloWithCompletion:(void (^ _Nonnull)(BOOL))completion;

0 commit comments

Comments
 (0)