@@ -575,12 +575,12 @@ NOTE(async_inferred_from_operation,none,
575
575
// Key-path expressions.
576
576
ERROR(expr_keypath_no_objc_runtime,none,
577
577
" '#keyPath' can only be used with the Objective-C runtime" , ())
578
- ERROR(expression_unused_keypath_result,none ,
578
+ ERROR(expression_unused_keypath_result,NoUsage ,
579
579
" result of key path is unused" , ())
580
580
ERROR(expr_keypath_non_objc_property,none,
581
581
" argument of '#keyPath' refers to non-'@objc' property %0" ,
582
582
(Identifier))
583
- WARNING(expr_keypath_swift3_objc_inference,none ,
583
+ WARNING(expr_keypath_swift3_objc_inference,Deprecation ,
584
584
" argument of '#keyPath' refers to property %0 in %1 that depends on "
585
585
" '@objc' inference deprecated in Swift 4" ,
586
586
(Identifier, Identifier))
@@ -640,7 +640,7 @@ ERROR(expr_swift_keypath_anyobject_root,none,
640
640
" the root type of a Swift key path cannot be 'AnyObject'" , ())
641
641
ERROR(expr_keypath_multiparam_func_conversion, none,
642
642
" cannot convert key path into a multi-argument function type %0" , (Type))
643
- WARNING(expr_deprecated_writable_keypath,none ,
643
+ WARNING(expr_deprecated_writable_keypath,Deprecation ,
644
644
" forming a writable keypath to property %0 that is read-only in this context "
645
645
" is deprecated and will be removed in a future release" ,(DeclName))
646
646
@@ -683,7 +683,7 @@ ERROR(expr_selector_not_objc,none,
683
683
NOTE(make_decl_objc,none,
684
684
" add '@objc' to expose this %0 to Objective-C" ,
685
685
(DescriptiveDeclKind))
686
- WARNING(expr_selector_swift3_objc_inference,none ,
686
+ WARNING(expr_selector_swift3_objc_inference,Deprecation ,
687
687
" argument of '#selector' refers to %0 %1 in %2 that depends on "
688
688
" '@objc' inference deprecated in Swift 4" ,
689
689
(DescriptiveDeclKind, DeclName, Identifier))
@@ -693,10 +693,10 @@ WARNING(selector_literal_invalid,none,
693
693
" string literal is not a valid Objective-C selector" , ())
694
694
WARNING(selector_literal_undeclared,none,
695
695
" no method declared with Objective-C selector %0" , (ObjCSelector))
696
- WARNING(selector_literal_deprecated,none ,
696
+ WARNING(selector_literal_deprecated,Deprecation ,
697
697
" use of string literal for Objective-C selectors is deprecated; "
698
698
" use '#selector' or explicitly construct a 'Selector'" , ())
699
- WARNING(selector_literal_deprecated_suggest,none ,
699
+ WARNING(selector_literal_deprecated_suggest,Deprecation ,
700
700
" use of string literal for Objective-C selectors is deprecated; "
701
701
" use '#selector' instead" , ())
702
702
WARNING(selector_construction_suggest,none,
@@ -831,7 +831,7 @@ ERROR(invalid_redecl_implicit,none,
831
831
" invalid redeclaration of synthesized "
832
832
" %select{%0|implementation for protocol requirement}1 %2" ,
833
833
(DescriptiveDeclKind, bool , DeclName))
834
- WARNING(invalid_redecl_swift5_warning,none ,
834
+ WARNING(invalid_redecl_swift5_warning,Deprecation ,
835
835
" redeclaration of %0 is deprecated and will be an error in Swift 5" ,
836
836
(DeclName))
837
837
@@ -1274,7 +1274,7 @@ ERROR(extra_trailing_closure_in_call,none,
1274
1274
ERROR(trailing_closure_bad_param,none,
1275
1275
" trailing closure passed to parameter of type %0 that does not "
1276
1276
" accept a closure" , (Type))
1277
- WARNING(unlabeled_trailing_closure_deprecated,none ,
1277
+ WARNING(unlabeled_trailing_closure_deprecated,Deprecation ,
1278
1278
" backward matching of the unlabeled trailing closure is deprecated; label the argument with %0 to suppress this warning" ,
1279
1279
(Identifier))
1280
1280
NOTE(decl_multiple_defaulted_closure_parameters,none,
@@ -1554,7 +1554,7 @@ ERROR(missing_unimplemented_init_runtime,none,
1554
1554
ERROR(missing_undefined_runtime,none,
1555
1555
" standard library error: missing _undefined" , ())
1556
1556
1557
- WARNING(expr_dynamic_lookup_swift3_objc_inference,none ,
1557
+ WARNING(expr_dynamic_lookup_swift3_objc_inference,Deprecation ,
1558
1558
" reference to %0 %1 of %2 depends on '@objc' inference "
1559
1559
" deprecated in Swift 4" ,
1560
1560
(DescriptiveDeclKind, DeclName, Identifier))
@@ -2679,7 +2679,7 @@ WARNING(implicitly_final_cannot_be_open_swift4,none,
2679
2679
" static declarations}0 are implicitly 'final'; use 'public' instead of "
2680
2680
" 'open'" , (unsigned ))
2681
2681
2682
- WARNING(override_swift3_objc_inference,none ,
2682
+ WARNING(override_swift3_objc_inference,Deprecation ,
2683
2683
" override of %0 %1 from extension of %2 depends on deprecated "
2684
2684
" inference of '@objc'" ,
2685
2685
(DescriptiveDeclKind, DeclName, Identifier))
@@ -2695,7 +2695,7 @@ WARNING(duplicate_anyobject_class_inheritance,none,
2695
2695
" redundant inheritance from 'AnyObject' and Swift 3 'class' keyword" , ())
2696
2696
ERROR(inheritance_from_protocol_with_superclass,none,
2697
2697
" inheritance from class-constrained protocol composition type %0" , (Type))
2698
- WARNING(anyobject_class_inheritance_deprecated,none ,
2698
+ WARNING(anyobject_class_inheritance_deprecated,Deprecation ,
2699
2699
" using 'class' keyword to define a class-constrained protocol is deprecated; "
2700
2700
" use 'AnyObject' instead" , ())
2701
2701
ERROR(multiple_inheritance,none,
@@ -3760,7 +3760,7 @@ NOTE(fix_unqualified_access_top_level_multi,none,
3760
3760
" use '%0' to reference the %1 in module %2" ,
3761
3761
(StringRef, DescriptiveDeclKind, Identifier))
3762
3762
3763
- WARNING(warn_deprecated_conditional_conformance_outer_access,none ,
3763
+ WARNING(warn_deprecated_conditional_conformance_outer_access,Deprecation ,
3764
3764
" use of %0 as reference to %1 in %2 %3 will change in future versions of Swift to reference %4 in %5 %6 "
3765
3765
" which comes via a conditional conformance" ,
3766
3766
(DeclNameRef, DescriptiveDeclKind, DescriptiveDeclKind, DeclName,
@@ -3936,32 +3936,32 @@ WARNING(guard_always_succeeds,none,
3936
3936
" 'guard' condition is always true, body is unreachable" , ())
3937
3937
3938
3938
3939
- ERROR(expression_unused_closure,none ,
3939
+ ERROR(expression_unused_closure,NoUsage ,
3940
3940
" closure expression is unused" , ())
3941
- ERROR(expression_unused_function,none ,
3941
+ ERROR(expression_unused_function,NoUsage ,
3942
3942
" function is unused" , ())
3943
- WARNING(expression_unused_lvalue,none ,
3943
+ WARNING(expression_unused_lvalue,NoUsage ,
3944
3944
" %select{"
3945
3945
" variable|"
3946
3946
" property is accessed but result|"
3947
3947
" subscript is accessed but result"
3948
3948
" }0 is unused" ,
3949
3949
(unsigned ))
3950
- WARNING(expression_unused_result_call,none ,
3950
+ WARNING(expression_unused_result_call,NoUsage ,
3951
3951
" result of call to %0 is unused" , (DeclName))
3952
- WARNING(expression_unused_result_operator,none ,
3952
+ WARNING(expression_unused_result_operator,NoUsage ,
3953
3953
" result of operator %0 is unused" , (DeclName))
3954
- WARNING(expression_unused_result_unknown, none ,
3954
+ WARNING(expression_unused_result_unknown, NoUsage ,
3955
3955
" result of call to %select{function|closure}0 returning %1 is unused" , (bool , Type))
3956
- WARNING(expression_unused_result, none ,
3956
+ WARNING(expression_unused_result, NoUsage ,
3957
3957
" expression of type %0 is unused" , (Type))
3958
- WARNING(expression_unused_init_result,none ,
3958
+ WARNING(expression_unused_init_result,NoUsage ,
3959
3959
" result of %0 initializer is unused" , (Type))
3960
- WARNING(expression_unused_optional_try,none ,
3960
+ WARNING(expression_unused_optional_try,NoUsage ,
3961
3961
" result of 'try?' is unused" , ())
3962
- WARNING(expression_unused_selector_result, none ,
3962
+ WARNING(expression_unused_selector_result, NoUsage ,
3963
3963
" result of '#selector' is unused" , ())
3964
- WARNING(expression_unused_literal,none ,
3964
+ WARNING(expression_unused_literal,NoUsage ,
3965
3965
" %0 literal is unused" , (StringRef))
3966
3966
3967
3967
ERROR(assignment_lhs_not_lvalue,none,
@@ -4105,7 +4105,7 @@ ERROR(pattern_type_mismatch_context,none,
4105
4105
4106
4106
ERROR(tuple_pattern_in_non_tuple_context,none,
4107
4107
" tuple pattern cannot match values of the non-tuple type %0" , (Type))
4108
- WARNING(found_one_pattern_for_several_associated_values,none ,
4108
+ WARNING(found_one_pattern_for_several_associated_values,Deprecation ,
4109
4109
" enum case '%0' has %1 associated values; matching them as a tuple "
4110
4110
" is deprecated" , (StringRef, unsigned ))
4111
4111
WARNING(converting_tuple_into_several_associated_values,none,
@@ -4629,7 +4629,7 @@ ERROR(enum_element_ellipsis,none,
4629
4629
WARNING(implicitly_unwrapped_optional_in_illegal_position_interpreted_as_optional,none,
4630
4630
" using '!' is not allowed here; treating this as '?' instead" , ())
4631
4631
4632
- WARNING(implicitly_unwrapped_optional_deprecated_in_this_position,none ,
4632
+ WARNING(implicitly_unwrapped_optional_deprecated_in_this_position,Deprecation ,
4633
4633
" using '!' here is deprecated and will be removed in a future release" , ())
4634
4634
4635
4635
ERROR(implicitly_unwrapped_optional_in_illegal_position,none,
@@ -4693,7 +4693,7 @@ ERROR(attribute_requires_function_type,none,
4693
4693
" @%0 attribute only applies to function types" , (StringRef))
4694
4694
ERROR(unsupported_convention,none,
4695
4695
" convention '%0' not supported" , (StringRef))
4696
- ERROR(unreferenced_generic_parameter,none ,
4696
+ ERROR(unreferenced_generic_parameter,NoUsage ,
4697
4697
" generic parameter '%0' is not used in function signature" , (StringRef))
4698
4698
ERROR(unexpected_ctype_for_non_c_convention,none,
4699
4699
" convention '%0' does not support the 'cType' argument label, did you "
@@ -4808,9 +4808,9 @@ ERROR(objc_operator, none,
4808
4808
" operator methods cannot be declared @objc" , ())
4809
4809
ERROR(objc_operator_proto, none,
4810
4810
" @objc protocols must not have operator requirements" , ())
4811
- WARNING(objc_inference_swift3_dynamic,none ,
4811
+ WARNING(objc_inference_swift3_dynamic,Deprecation ,
4812
4812
" inference of '@objc' for 'dynamic' members is deprecated" , ())
4813
- WARNING(objc_inference_swift3_objc_derived,none ,
4813
+ WARNING(objc_inference_swift3_objc_derived,Deprecation ,
4814
4814
" inference of '@objc' for members of Objective-C-derived classes is "
4815
4815
" deprecated" , ())
4816
4816
@@ -4835,7 +4835,7 @@ ERROR(objc_setter_for_nonobjc_property,none,
4835
4835
" '@objc' setter for non-'@objc' property" , ())
4836
4836
ERROR(objc_setter_for_nonobjc_subscript,none,
4837
4837
" '@objc' setter for non-'@objc' subscript" , ())
4838
- WARNING(accessor_swift3_objc_inference,none ,
4838
+ WARNING(accessor_swift3_objc_inference,Deprecation ,
4839
4839
" %select{%0 %1|%1}2 with '@objc' %select{getter|setter}3 depends on "
4840
4840
" deprecated inference of '@objc'" ,
4841
4841
(DescriptiveDeclKind, DeclName, bool , bool ))
@@ -4930,7 +4930,7 @@ NOTE(objc_overriding_objc_decl,none,
4930
4930
NOTE(objc_witness_objc_requirement,none,
4931
4931
" satisfying requirement for %0 %1 in protocol %2" ,
4932
4932
(DescriptiveDeclKind, DeclName, Identifier))
4933
- WARNING(witness_swift3_objc_inference,none ,
4933
+ WARNING(witness_swift3_objc_inference,Deprecation ,
4934
4934
" use of %0 %1 to satisfy a requirement of protocol %2 depends on "
4935
4935
" '@objc' inference deprecated in Swift 4" ,
4936
4936
(DescriptiveDeclKind, DeclName, Type))
@@ -5212,13 +5212,13 @@ NOTE(availability_obsoleted, none,
5212
5212
" %select{getter for |setter for |}0%1 was obsoleted in %2 %3" ,
5213
5213
(unsigned , DeclName, StringRef, llvm::VersionTuple))
5214
5214
5215
- WARNING(availability_deprecated, none ,
5215
+ WARNING(availability_deprecated, Deprecation ,
5216
5216
" %select{getter for |setter for |}0%1 %select{is|%select{is|was}4}2 "
5217
5217
" deprecated%select{| in %3%select{| %5}4}2%select{|: %6}6" ,
5218
5218
(unsigned , DeclName, bool , StringRef, bool , llvm::VersionTuple,
5219
5219
StringRef))
5220
5220
5221
- WARNING(availability_deprecated_rename, none ,
5221
+ WARNING(availability_deprecated_rename, Deprecation ,
5222
5222
" %select{getter for |setter for |}0%1 %select{is|%select{is|was}4}2 "
5223
5223
" deprecated%select{| in %3%select{| %5}4}2: "
5224
5224
" %select{renamed to|replaced by}6%" REPLACEMENT_DECL_KIND_SELECT " 7 "
@@ -5330,7 +5330,7 @@ NOTE(conformance_availability_obsoleted, none,
5330
5330
" conformance of %0 to %1 was obsoleted in %2 %3" ,
5331
5331
(Type, Type, StringRef, llvm::VersionTuple))
5332
5332
5333
- WARNING(conformance_availability_deprecated, none ,
5333
+ WARNING(conformance_availability_deprecated, Deprecation ,
5334
5334
" conformance of %0 to %1 %select{is|%select{is|was}4}2 "
5335
5335
" deprecated%select{| in %3%select{| %5}4}2%select{|: %6}6" ,
5336
5336
(Type, Type, bool , StringRef, bool , llvm::VersionTuple,
@@ -5476,31 +5476,31 @@ NOTE(specialize_found_function_of_type, none,
5476
5476
// MARK: Variable usage diagnostics
5477
5477
// ------------------------------------------------------------------------------
5478
5478
5479
- WARNING(pbd_never_used_stmtcond, none ,
5479
+ WARNING(pbd_never_used_stmtcond, NoUsage ,
5480
5480
" value %0 was defined but never used; consider replacing "
5481
5481
" with boolean test" ,
5482
5482
(Identifier))
5483
- WARNING(unused_setter_parameter, none ,
5483
+ WARNING(unused_setter_parameter, NoUsage ,
5484
5484
" setter argument %0 was never used, but the property was accessed" ,
5485
5485
(Identifier))
5486
5486
NOTE(fixit_for_unused_setter_parameter, none,
5487
5487
" did you mean to use %0 instead of accessing the property's current value?" , (Identifier))
5488
5488
5489
- WARNING(pbd_never_used, none ,
5489
+ WARNING(pbd_never_used, NoUsage ,
5490
5490
" initialization of %select{variable|immutable value}1 %0 was never used"
5491
5491
" ; consider replacing with assignment to '_' or removing it" ,
5492
5492
(Identifier, unsigned ))
5493
5493
5494
5494
5495
- WARNING(capture_never_used, none ,
5495
+ WARNING(capture_never_used, NoUsage ,
5496
5496
" capture %0 was never used" ,
5497
5497
(Identifier))
5498
5498
5499
- WARNING(variable_never_used, none ,
5499
+ WARNING(variable_never_used, NoUsage ,
5500
5500
" %select{variable|immutable value}1 %0 was never used; "
5501
5501
" consider replacing with '_' or removing it" ,
5502
5502
(Identifier, unsigned ))
5503
- WARNING(immutable_value_never_used_but_assigned, none ,
5503
+ WARNING(immutable_value_never_used_but_assigned, NoUsage ,
5504
5504
" immutable value %0 was never used; consider removing it" ,
5505
5505
(Identifier))
5506
5506
WARNING(variable_never_mutated, none,
@@ -5585,7 +5585,7 @@ ERROR(override_nsobject_hash_error,none,
5585
5585
" 'NSObject.hash(into:)' is not overridable; "
5586
5586
" did you mean to override 'NSObject.hash'?" , ())
5587
5587
5588
- WARNING(hashvalue_implementation,none ,
5588
+ WARNING(hashvalue_implementation,Deprecation ,
5589
5589
" 'Hashable.hashValue' is deprecated as a protocol requirement; "
5590
5590
" conform type %0 to 'Hashable' by implementing 'hash(into:)' instead" ,
5591
5591
(Type))
@@ -5705,10 +5705,10 @@ ERROR(property_wrapper_type_not_usable_from_inline,none,
5705
5705
" %select{%select{variable|constant}0|property}1 "
5706
5706
" must be '@usableFromInline' or public" ,
5707
5707
(bool , bool ))
5708
- WARNING(property_wrapper_wrapperValue,none ,
5708
+ WARNING(property_wrapper_wrapperValue,Deprecation ,
5709
5709
" property wrapper's 'wrapperValue' property should be renamed to "
5710
5710
" 'projectedValue'; use of 'wrapperValue' is deprecated" , ())
5711
- WARNING(property_wrapper_init_initialValue,none ,
5711
+ WARNING(property_wrapper_init_initialValue,Deprecation ,
5712
5712
" property wrapper's 'init(initialValue:)' should be renamed "
5713
5713
" to 'init(wrappedValue:)'; use of 'init(initialValue:)' is deprecated" ,
5714
5714
())
@@ -5805,7 +5805,7 @@ NOTE(result_builder_missing_build_limited_availability, none,
5805
5805
// MARK: Tuple Shuffle Diagnostics
5806
5806
// ------------------------------------------------------------------------------
5807
5807
5808
- WARNING(warn_reordering_tuple_shuffle_deprecated,none ,
5808
+ WARNING(warn_reordering_tuple_shuffle_deprecated,Deprecation ,
5809
5809
" expression shuffles the elements of this tuple; "
5810
5810
" this behavior is deprecated" , ())
5811
5811
0 commit comments