@@ -4274,9 +4274,10 @@ ERROR(actor_isolated_from_escaping_closure,none,
4274
4274
ERROR(local_function_executed_concurrently,none,
4275
4275
" concurrently-executed %0 %1 must be marked as '@concurrent'" ,
4276
4276
(DescriptiveDeclKind, DeclName))
4277
- ERROR(concurrent_mutation_of_local_capture,none,
4278
- " mutation of captured %0 %1 in concurrently-executing code" ,
4279
- (DescriptiveDeclKind, DeclName))
4277
+ ERROR(concurrent_access_of_local_capture,none,
4278
+ " %select{mutation of|reference to}0 captured %1 %2 in "
4279
+ " concurrently-executing code" ,
4280
+ (bool , DescriptiveDeclKind, DeclName))
4280
4281
NOTE(actor_isolated_sync_func,none,
4281
4282
" calls to %0 %1 from outside of its actor context are "
4282
4283
" implicitly asynchronous" ,
@@ -4323,6 +4324,13 @@ ERROR(concurrent_value_outside_source_file,none,
4323
4324
" conformance 'ConcurrentValue' must occur in the same source file as "
4324
4325
" %0 %1; use 'UnsafeConcurrentValue' for retroactive conformance" ,
4325
4326
(DescriptiveDeclKind, DeclName))
4327
+ ERROR(concurrent_value_open_class,none,
4328
+ " open class %0 cannot conform to `ConcurrentValue`; "
4329
+ " use `UnsafeConcurrentValue`" , (DeclName))
4330
+ ERROR(concurrent_value_inherit,none,
4331
+ " `ConcurrentValue` class %1 cannot inherit from another class"
4332
+ " %select{| other than 'NSObject'}0" ,
4333
+ (bool , DeclName))
4326
4334
4327
4335
ERROR(actorindependent_let,none,
4328
4336
" '@actorIndependent' is meaningless on 'let' declarations because "
@@ -5645,5 +5653,35 @@ ERROR(atomics_ordering_must_be_constant, none,
5645
5653
" ordering argument must be a static method or property of %0" ,
5646
5654
(Identifier))
5647
5655
5656
+ // ------------------------------------------------------------------------------
5657
+ // MARK: access notes
5658
+ // ------------------------------------------------------------------------------
5659
+
5660
+ REMARK(attr_added_by_access_note, none,
5661
+ " access note for %0 adds %select{attribute|modifier}1 '%2' to this %3" ,
5662
+ (StringRef, bool , StringRef, DescriptiveDeclKind))
5663
+ NOTE(fixit_attr_added_by_access_note, none,
5664
+ " add %select{attribute|modifier}0 explicitly to silence this warning" ,
5665
+ (bool ))
5666
+
5667
+ REMARK(attr_removed_by_access_note, none,
5668
+ " access note for %0 removes %select{attribute|modifier}1 '%2' from "
5669
+ " this %3" ,
5670
+ (StringRef, bool , StringRef, DescriptiveDeclKind))
5671
+ NOTE(fixit_attr_removed_by_access_note, none,
5672
+ " remove %select{attribute|modifier}0 explicitly to silence this warning" ,
5673
+ (bool ))
5674
+
5675
+ REMARK(attr_objc_name_changed_by_access_note, none,
5676
+ " access note for %0 changes the '@objc' name of this %1 to %2" ,
5677
+ (StringRef, DescriptiveDeclKind, ObjCSelector))
5678
+ NOTE(fixit_attr_objc_name_changed_by_access_note, none,
5679
+ " change '@objc' name in source code explicitly to silence this warning" ,
5680
+ ())
5681
+ REMARK(attr_objc_name_conflicts_with_access_note, none,
5682
+ " access note for %0 changes the '@objc' name of this %1 to %2, but "
5683
+ " source code specifies %3; the access note will be ignored" ,
5684
+ (StringRef, DescriptiveDeclKind, ObjCSelector, ObjCSelector))
5685
+
5648
5686
#define UNDEFINE_DIAGNOSTIC_MACROS
5649
5687
#include " DefineDiagnosticMacros.h"
0 commit comments