Skip to content

Commit f9e6478

Browse files
Merge pull request #71468 from nate-chandler/nfc/20240208/1/bitwise-copyable-known-protocol-kind
[NFC] BitwiseCopyable: Use getKnownProtocolKind.
2 parents 61326af + c73ecd0 commit f9e6478

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/Sema/TypeCheckDecl.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -690,10 +690,8 @@ ExistentialConformsToSelfRequest::evaluate(Evaluator &evaluator,
690690
// Marker protocols always self-conform.
691691
if (decl->isMarkerProtocol()) {
692692
// Except for BitwiseCopyable an existential of which is non-trivial.
693-
auto *bitwiseCopyableProtocol =
694-
decl->getASTContext().getProtocol(KnownProtocolKind::BitwiseCopyable);
695693
if (decl->getASTContext().LangOpts.hasFeature(Feature::BitwiseCopyable) &&
696-
decl == bitwiseCopyableProtocol) {
694+
decl->getKnownProtocolKind() == KnownProtocolKind::BitwiseCopyable) {
697695
return false;
698696
}
699697
return true;

0 commit comments

Comments
 (0)