@@ -2188,14 +2188,14 @@ AvailabilityAttr *Sema::mergeAvailabilityAttr(
2188
2188
bool FoundAny = false ;
2189
2189
bool OverrideOrImpl = false ;
2190
2190
switch (AMK) {
2191
- case AMK_None :
2192
- case AMK_Redeclaration :
2191
+ case AvailabilityMergeKind::None :
2192
+ case AvailabilityMergeKind::Redeclaration :
2193
2193
OverrideOrImpl = false ;
2194
2194
break ;
2195
2195
2196
- case AMK_Override :
2197
- case AMK_ProtocolImplementation :
2198
- case AMK_OptionalProtocolImplementation :
2196
+ case AvailabilityMergeKind::Override :
2197
+ case AvailabilityMergeKind::ProtocolImplementation :
2198
+ case AvailabilityMergeKind::OptionalProtocolImplementation :
2199
2199
OverrideOrImpl = true ;
2200
2200
break ;
2201
2201
}
@@ -2268,9 +2268,10 @@ AvailabilityAttr *Sema::mergeAvailabilityAttr(
2268
2268
if (Which == -1 ) {
2269
2269
Diag (OldAA->getLocation (),
2270
2270
diag::warn_mismatched_availability_override_unavail)
2271
- << AvailabilityAttr::getPrettyPlatformName (Platform->getName ())
2272
- << (AMK == AMK_Override);
2273
- } else if (Which != 1 && AMK == AMK_OptionalProtocolImplementation) {
2271
+ << AvailabilityAttr::getPrettyPlatformName (Platform->getName ())
2272
+ << (AMK == AvailabilityMergeKind::Override);
2273
+ } else if (Which != 1 && AMK == AvailabilityMergeKind::
2274
+ OptionalProtocolImplementation) {
2274
2275
// Allow different 'introduced' / 'obsoleted' availability versions
2275
2276
// on a method that implements an optional protocol requirement. It
2276
2277
// makes less sense to allow this for 'deprecated' as the user can't
@@ -2281,12 +2282,12 @@ AvailabilityAttr *Sema::mergeAvailabilityAttr(
2281
2282
} else {
2282
2283
Diag (OldAA->getLocation (),
2283
2284
diag::warn_mismatched_availability_override)
2284
- << Which
2285
- << AvailabilityAttr::getPrettyPlatformName (Platform->getName ())
2286
- << FirstVersion.getAsString () << SecondVersion.getAsString ()
2287
- << (AMK == AMK_Override );
2285
+ << Which
2286
+ << AvailabilityAttr::getPrettyPlatformName (Platform->getName ())
2287
+ << FirstVersion.getAsString () << SecondVersion.getAsString ()
2288
+ << (AMK == AvailabilityMergeKind::Override );
2288
2289
}
2289
- if (AMK == AMK_Override )
2290
+ if (AMK == AvailabilityMergeKind::Override )
2290
2291
Diag (CI.getLoc (), diag::note_overridden_method);
2291
2292
else
2292
2293
Diag (CI.getLoc (), diag::note_protocol_method);
@@ -2427,7 +2428,7 @@ static void handleAvailabilityAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
2427
2428
AvailabilityAttr *NewAttr = S.mergeAvailabilityAttr (
2428
2429
ND, AL, II, false /* Implicit*/ , Introduced.Version , Deprecated.Version ,
2429
2430
Obsoleted.Version , IsUnavailable, Str, IsStrict, Replacement,
2430
- Sema::AMK_None , PriorityModifier, IIEnvironment);
2431
+ AvailabilityMergeKind::None , PriorityModifier, IIEnvironment);
2431
2432
if (NewAttr)
2432
2433
D->addAttr (NewAttr);
2433
2434
@@ -2483,8 +2484,8 @@ static void handleAvailabilityAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
2483
2484
AvailabilityAttr *NewAttr = S.mergeAvailabilityAttr (
2484
2485
ND, AL, NewII, true /* Implicit*/ , NewIntroduced, NewDeprecated,
2485
2486
NewObsoleted, IsUnavailable, Str, IsStrict, Replacement,
2486
- Sema::AMK_None, PriorityModifier + Sema::AP_InferredFromOtherPlatform ,
2487
- IIEnvironment);
2487
+ AvailabilityMergeKind::None ,
2488
+ PriorityModifier + Sema::AP_InferredFromOtherPlatform, IIEnvironment);
2488
2489
if (NewAttr)
2489
2490
D->addAttr (NewAttr);
2490
2491
}
@@ -2525,8 +2526,8 @@ static void handleAvailabilityAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
2525
2526
AvailabilityAttr *NewAttr = S.mergeAvailabilityAttr (
2526
2527
ND, AL, NewII, true /* Implicit*/ , NewIntroduced, NewDeprecated,
2527
2528
NewObsoleted, IsUnavailable, Str, IsStrict, Replacement,
2528
- Sema::AMK_None, PriorityModifier + Sema::AP_InferredFromOtherPlatform ,
2529
- IIEnvironment);
2529
+ AvailabilityMergeKind::None ,
2530
+ PriorityModifier + Sema::AP_InferredFromOtherPlatform, IIEnvironment);
2530
2531
if (NewAttr)
2531
2532
D->addAttr (NewAttr);
2532
2533
}
@@ -2558,7 +2559,7 @@ static void handleAvailabilityAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
2558
2559
MinMacCatalystVersion (Introduced.Version ),
2559
2560
MinMacCatalystVersion (Deprecated.Version ),
2560
2561
MinMacCatalystVersion (Obsoleted.Version ), IsUnavailable, Str,
2561
- IsStrict, Replacement, Sema::AMK_None ,
2562
+ IsStrict, Replacement, AvailabilityMergeKind::None ,
2562
2563
PriorityModifier + Sema::AP_InferredFromOtherPlatform, IIEnvironment);
2563
2564
if (NewAttr)
2564
2565
D->addAttr (NewAttr);
@@ -2600,7 +2601,7 @@ static void handleAvailabilityAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
2600
2601
VersionOrEmptyVersion (NewIntroduced),
2601
2602
VersionOrEmptyVersion (NewDeprecated),
2602
2603
VersionOrEmptyVersion (NewObsoleted), /* IsUnavailable=*/ false , Str,
2603
- IsStrict, Replacement, Sema::AMK_None ,
2604
+ IsStrict, Replacement, AvailabilityMergeKind::None ,
2604
2605
PriorityModifier + Sema::AP_InferredFromOtherPlatform +
2605
2606
Sema::AP_InferredFromOtherPlatform,
2606
2607
IIEnvironment);
0 commit comments