Skip to content

Commit dfb8d74

Browse files
authored
Merge pull request #59672 from beccadax/what-is-the-protocol-for-generating-sendable
Ignore Sendable conformances in PrintAsClang
2 parents 158953c + 8a8e71e commit dfb8d74

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
@@ -439,8 +439,10 @@ class ModuleWriter {
439439
bool allRequirementsSatisfied = true;
440440

441441
for (auto proto : PD->getInheritedProtocols()) {
442-
assert(proto->isObjC());
443-
allRequirementsSatisfied &= require(proto);
442+
if (printer.shouldInclude(proto)) {
443+
assert(proto->isObjC());
444+
allRequirementsSatisfied &= require(proto);
445+
}
444446
}
445447

446448
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)