@@ -315,12 +315,12 @@ ERROR(missing_never_call_closure,none,
315315 (Type))
316316
317317ERROR(missing_return_decl,none,
318- " missing return in %1 expected to return %0" ,
319- (Type, DescriptiveDeclKind ))
318+ " missing return in %kindonly1 expected to return %0" ,
319+ (Type, const AbstractFunctionDecl * ))
320320ERROR(missing_never_call_decl,none,
321- " %1 with uninhabited return type %0 is missing "
321+ " %kindonly1 with uninhabited return type %0 is missing "
322322 " call to another never-returning function on all paths" ,
323- (Type, DescriptiveDeclKind ))
323+ (Type, const AbstractFunctionDecl * ))
324324
325325NOTE(missing_return_last_expr_note,none,
326326 " did you mean to return the last expression?" , ())
@@ -701,8 +701,9 @@ WARNING(warning_int_to_fp_inexact, none,
701701
702702// Flow-isolation diagnostics
703703ERROR(isolated_after_nonisolated, none,
704- " cannot access %1 %2 here in %select{nonisolated initializer|deinitializer}0" ,
705- (bool , DescriptiveDeclKind, DeclName))
704+ " cannot access %kind1 here in "
705+ " %select{nonisolated initializer|deinitializer}0" ,
706+ (bool , const ValueDecl *))
706707NOTE(nonisolated_blame, none, " after %1%2 %3, "
707708 " only nonisolated properties of 'self' can be accessed from "
708709 " %select{this init|a deinit}0" , (bool , StringRef, StringRef, DeclName))
@@ -981,16 +982,16 @@ NOTE(regionbasedisolation_type_use_after_send, none,
981982 " sending value of non-Sendable type %0 to %1 callee risks causing data races between %1 and local %2 uses" ,
982983 (Type, ActorIsolation, ActorIsolation))
983984NOTE(regionbasedisolation_type_use_after_send_callee, none,
984- " sending value of non-Sendable type %0 to %1 %2 %3 risks causing data "
985- " races between %1 and local %4 uses" ,
986- (Type, ActorIsolation, DescriptiveDeclKind, DeclName , ActorIsolation))
985+ " sending value of non-Sendable type %0 to %1 %kind2 risks causing data "
986+ " races between %1 and local %3 uses" ,
987+ (Type, ActorIsolation, const ValueDecl * , ActorIsolation))
987988
988989NOTE(regionbasedisolation_named_info_send_yields_race, none,
989990 " sending %1%0 to %2 callee risks causing data races between %2 and local %3 uses" ,
990991 (Identifier, StringRef, ActorIsolation, ActorIsolation))
991992NOTE(regionbasedisolation_named_info_send_yields_race_callee, none,
992- " sending %1%0 to %2 %3 %4 risks causing data races between %2 and local %5 uses" ,
993- (Identifier, StringRef, ActorIsolation, DescriptiveDeclKind, DeclName , ActorIsolation))
993+ " sending %1%0 to %2 %kind3 risks causing data races between %2 and local %4 uses" ,
994+ (Identifier, StringRef, ActorIsolation, const ValueDecl * , ActorIsolation))
994995
995996// Use after send closure.
996997NOTE(regionbasedisolation_type_isolated_capture_yields_race, none,
@@ -1013,8 +1014,8 @@ NOTE(regionbasedisolation_typed_use_after_sending, none,
10131014 " Passing value of non-Sendable type %0 as a 'sending' argument risks causing races in between local and caller code" ,
10141015 (Type))
10151016NOTE(regionbasedisolation_typed_use_after_sending_callee, none,
1016- " Passing value of non-Sendable type %0 as a 'sending' argument to %1 %2 risks causing races in between local and caller code" ,
1017- (Type, DescriptiveDeclKind, DeclName ))
1017+ " Passing value of non-Sendable type %0 as a 'sending' argument to %kind1 risks causing races in between local and caller code" ,
1018+ (Type, const ValueDecl * ))
10181019
10191020// ===
10201021// Sending Never Sendable Emitter
@@ -1023,8 +1024,8 @@ NOTE(regionbasedisolation_named_send_never_sendable, none,
10231024 " sending %1%0 to %2 callee risks causing data races between %2 and %3 uses" ,
10241025 (Identifier, StringRef, ActorIsolation, StringRef))
10251026NOTE(regionbasedisolation_named_send_never_sendable_callee, none,
1026- " sending %1%0 to %2 %3 %4 risks causing data races between %2 and %5 uses" ,
1027- (Identifier, StringRef, ActorIsolation, DescriptiveDeclKind, DeclName , StringRef))
1027+ " sending %1%0 to %2 %kind3 risks causing data races between %2 and %4 uses" ,
1028+ (Identifier, StringRef, ActorIsolation, const ValueDecl * , StringRef))
10281029
10291030NOTE(regionbasedisolation_named_send_into_sending_param, none,
10301031 " %0%1 is passed as a 'sending' parameter; Uses in callee may race with "
@@ -1048,8 +1049,8 @@ NOTE(regionbasedisolation_typed_tns_passed_to_sending_closure_helper_have_value_
10481049 " closure captures %0 which is accessible to code in the current task" ,
10491050 (DeclName))
10501051NOTE(regionbasedisolation_typed_tns_passed_to_sending_closure_helper_have_boxed_value_task_isolated, none,
1051- " closure captures reference to mutable %1 %0 which is accessible to code in the current task" ,
1052- (DeclName, DescriptiveDeclKind ))
1052+ " closure captures reference to mutable %kind0 which is accessible to code in the current task" ,
1053+ (const ValueDecl * ))
10531054NOTE(regionbasedisolation_typed_tns_passed_to_sending_closure_helper_have_value_region, none,
10541055 " closure captures %1 which is accessible to %0 code" ,
10551056 (StringRef, DeclName))
@@ -1065,8 +1066,8 @@ NOTE(regionbasedisolation_closure_captures_actor, none,
10651066 (DeclName, StringRef))
10661067
10671068NOTE(regionbasedisolation_typed_tns_passed_to_sending_callee, none,
1068- " Passing %0 value of non-Sendable type %1 as a 'sending' parameter to %2 %3 risks causing races inbetween %0 uses and uses reachable from %3 " ,
1069- (StringRef, Type, DescriptiveDeclKind, DeclName ))
1069+ " Passing %0 value of non-Sendable type %1 as a 'sending' parameter to %kind2 risks causing races inbetween %0 uses and uses reachable from %2 " ,
1070+ (StringRef, Type, const ValueDecl * ))
10701071
10711072NOTE(regionbasedisolation_named_send_nt_asynclet_capture, none,
10721073 " sending %1 %0 into async let risks causing data races between nonisolated and %1 uses" ,
@@ -1075,8 +1076,8 @@ NOTE(regionbasedisolation_typed_sendneversendable_via_arg, none,
10751076 " sending %0 value of non-Sendable type %1 to %2 callee risks causing races in between %0 and %2 uses" ,
10761077 (StringRef, Type, ActorIsolation))
10771078NOTE(regionbasedisolation_typed_sendneversendable_via_arg_callee, none,
1078- " sending %0 value of non-Sendable type %1 to %2 %3 %4 risks causing races in between %0 and %2 uses" ,
1079- (StringRef, Type, ActorIsolation, DescriptiveDeclKind, DeclName ))
1079+ " sending %0 value of non-Sendable type %1 to %2 %kind3 risks causing races in between %0 and %2 uses" ,
1080+ (StringRef, Type, ActorIsolation, const ValueDecl * ))
10801081
10811082// Error that is only used when the send non sendable emitter cannot discover any
10821083// information to give a better diagnostic.
0 commit comments