Merge pull request #59672 from beccadax/what-is-the-protocol-for-generating-sendable

Ignore Sendable conformances in PrintAsClang
This commit is contained in:
Becca Royal-Gordon
2022-06-23 17:15:09 -07:00
committed by GitHub
2 changed files with 5 additions and 3 deletions

View File

@@ -439,8 +439,10 @@ public:
bool allRequirementsSatisfied = true; bool allRequirementsSatisfied = true;
for (auto proto : PD->getInheritedProtocols()) { for (auto proto : PD->getInheritedProtocols()) {
assert(proto->isObjC()); if (printer.shouldInclude(proto)) {
allRequirementsSatisfied &= require(proto); assert(proto->isObjC());
allRequirementsSatisfied &= require(proto);
}
} }
if (!allRequirementsSatisfied) if (!allRequirementsSatisfied)

View File

@@ -25,7 +25,7 @@ import objc_generics
// CHECK-LABEL: @protocol B <A> // CHECK-LABEL: @protocol B <A>
// CHECK-NEXT: @end // CHECK-NEXT: @end
@objc protocol B : A {} @objc protocol B : A, Sendable {}
// CHECK-LABEL: @protocol CompletionAndAsync // CHECK-LABEL: @protocol CompletionAndAsync
// CHECK-NEXT: - (void)helloWithCompletion:(void (^ _Nonnull)(BOOL))completion; // CHECK-NEXT: - (void)helloWithCompletion:(void (^ _Nonnull)(BOOL))completion;