@@ -5125,34 +5125,33 @@ void AttributeChecker::checkBackDeployedAttrs(
5125
5125
D->getLoc (), D->getInnermostDeclContext ());
5126
5126
5127
5127
// Unavailable decls cannot be back deployed.
5128
- if ( auto unavailableDomain = availability. getUnavailableDomain ()) {
5129
- auto backDeployedDomain = AvailabilityDomain::forPlatform (Attr-> Platform );
5130
- if (unavailableDomain-> contains (backDeployedDomain)) {
5131
- auto platformString = prettyPlatformString (Attr->Platform );
5132
- llvm::VersionTuple ignoredVersion;
5133
-
5134
- AvailabilityInference::updateBeforePlatformForFallback (
5135
- Attr, Ctx, platformString, ignoredVersion);
5136
-
5137
- diagnose (AtLoc, diag::attr_has_no_effect_on_unavailable_decl, Attr, VD,
5138
- platformString);
5139
-
5140
- // Find the attribute that makes the declaration unavailable.
5141
- const Decl *attrDecl = D;
5142
- do {
5143
- if (auto unavailableAttr = attrDecl->getUnavailableAttr ()) {
5144
- diagnose (unavailableAttr->getParsedAttr ()->AtLoc ,
5145
- diag::availability_marked_unavailable, VD)
5146
- .highlight (unavailableAttr->getParsedAttr ()->getRange ());
5147
- break ;
5148
- }
5128
+ auto backDeployedDomain = AvailabilityDomain::forPlatform (Attr-> Platform );
5129
+ if ( auto unavailableDomain =
5130
+ availability. containsUnavailableDomain (backDeployedDomain)) {
5131
+ auto platformString = prettyPlatformString (Attr->Platform );
5132
+ llvm::VersionTuple ignoredVersion;
5133
+
5134
+ AvailabilityInference::updateBeforePlatformForFallback (
5135
+ Attr, Ctx, platformString, ignoredVersion);
5136
+
5137
+ diagnose (AtLoc, diag::attr_has_no_effect_on_unavailable_decl, Attr, VD,
5138
+ platformString);
5139
+
5140
+ // Find the attribute that makes the declaration unavailable.
5141
+ const Decl *attrDecl = D;
5142
+ do {
5143
+ if (auto unavailableAttr = attrDecl->getUnavailableAttr ()) {
5144
+ diagnose (unavailableAttr->getParsedAttr ()->AtLoc ,
5145
+ diag::availability_marked_unavailable, VD)
5146
+ .highlight (unavailableAttr->getParsedAttr ()->getRange ());
5147
+ break ;
5148
+ }
5149
5149
5150
- attrDecl = AvailabilityInference::parentDeclForInferredAvailability (
5151
- attrDecl);
5152
- } while (attrDecl);
5150
+ attrDecl =
5151
+ AvailabilityInference::parentDeclForInferredAvailability ( attrDecl);
5152
+ } while (attrDecl);
5153
5153
5154
- continue ;
5155
- }
5154
+ continue ;
5156
5155
}
5157
5156
5158
5157
// Verify that the decl is available before the back deployment boundary.
0 commit comments