@@ -38,8 +38,8 @@ bb0(%0 : $Int):
38
38
%3 = project_box %2 : ${ var Int }, 0
39
39
store %0 to [trivial] %3 : $*Int
40
40
%4 = function_ref @takesTwoInouts : $@convention(thin) (@inout Int, @inout Int) -> ()
41
- %5 = begin_access [modify] [unknown] %3 : $*Int // expected-note {{conflicting modification requires exclusive access}}
42
- %6 = begin_access [modify] [unknown] %3 : $*Int // expected-warning {{modification requires exclusive access }}
41
+ %5 = begin_access [modify] [unknown] %3 : $*Int // expected-warning {{simultaneous accesses; modification requires exclusive access}}
42
+ %6 = begin_access [modify] [unknown] %3 : $*Int // expected-note {{conflicting access is here }}
43
43
%7 = apply %4(%5, %6) : $@convention(thin) (@inout Int, @inout Int) -> ()
44
44
end_access %6 : $*Int
45
45
end_access %5: $*Int
@@ -55,9 +55,9 @@ bb0(%0 : $Int):
55
55
%3 = project_box %2 : ${ var Int }, 0
56
56
store %0 to [trivial] %3 : $*Int
57
57
%4 = function_ref @takesTwoInouts : $@convention(thin) (@inout Int, @inout Int) -> ()
58
- %5 = begin_access [modify] [unknown] %3 : $*Int // expected-note {{conflicting modification requires exclusive access}}
58
+ %5 = begin_access [modify] [unknown] %3 : $*Int // expected-warning {{simultaneous accesses; modification requires exclusive access}}
59
59
%6 = begin_access [modify] [unknown] %5 : $*Int
60
- %7 = begin_access [modify] [unknown] %3 : $*Int // expected-warning {{modification requires exclusive access }}
60
+ %7 = begin_access [modify] [unknown] %3 : $*Int // expected-note {{conflicting access is here }}
61
61
%8 = apply %4(%5, %6) : $@convention(thin) (@inout Int, @inout Int) -> ()
62
62
end_access %7 : $*Int
63
63
end_access %6 : $*Int
@@ -147,8 +147,8 @@ bb0(%0 : $Int, %1 : $Builtin.Int1):
147
147
br bb1
148
148
bb1:
149
149
// Make sure we don't diagnose twice.
150
- %4 = begin_access [modify] [unknown] %3 : $*Int // expected-note {{conflicting modification requires exclusive access}}
151
- %5 = begin_access [modify] [unknown] %3 : $*Int // expected-warning {{modification requires exclusive access }}
150
+ %4 = begin_access [modify] [unknown] %3 : $*Int // expected-warning {{simultaneous accesses; modification requires exclusive access}}
151
+ %5 = begin_access [modify] [unknown] %3 : $*Int // expected-note {{conflicting access is here }}
152
152
end_access %5: $*Int
153
153
end_access %4: $*Int
154
154
cond_br %1, bb1, bb2
@@ -198,8 +198,8 @@ bb0(%0 : $Int):
198
198
%1 = alloc_box ${ var Int }
199
199
%2 = project_box %1 : ${ var Int }, 0
200
200
store %0 to [trivial] %2 : $*Int
201
- %4 = begin_access [read] [unknown] %2 : $*Int // expected-note {{conflicting read requires shared access }}
202
- %5 = begin_access [modify] [unknown] %2 : $*Int // expected-warning {{modification requires exclusive access}}
201
+ %4 = begin_access [read] [unknown] %2 : $*Int // expected-note {{conflicting access is here }}
202
+ %5 = begin_access [modify] [unknown] %2 : $*Int // expected-warning {{simultaneous accesses; modification requires exclusive access}}
203
203
end_access %5 : $*Int
204
204
end_access %4: $*Int
205
205
destroy_value %1 : ${ var Int }
@@ -213,8 +213,8 @@ bb0(%0 : $Int):
213
213
%1 = alloc_box ${ var Int }
214
214
%2 = project_box %1 : ${ var Int }, 0
215
215
store %0 to [trivial] %2 : $*Int
216
- %4 = begin_access [modify] [unknown] %2 : $*Int // expected-note {{conflicting modification requires exclusive access}}
217
- %5 = begin_access [read] [unknown] %2 : $*Int // expected-warning {{read requires shared access }}
216
+ %4 = begin_access [modify] [unknown] %2 : $*Int // expected-warning {{simultaneous accesses; modification requires exclusive access}}
217
+ %5 = begin_access [read] [unknown] %2 : $*Int // expected-note {{conflicting access is here }}
218
218
end_access %5 : $*Int
219
219
end_access %4: $*Int
220
220
destroy_value %1 : ${ var Int }
@@ -232,11 +232,11 @@ sil hidden @classStoredProperty : $@convention(thin) (ClassWithStoredProperty) -
232
232
bb0(%0 : $ClassWithStoredProperty):
233
233
%1 = ref_element_addr %0 : $ClassWithStoredProperty, #ClassWithStoredProperty.f
234
234
235
- // expected-note @+1{{conflicting modification requires exclusive access}}
235
+ // expected-warning @+1{{simultaneous accesses to var 'f'; modification requires exclusive access}}
236
236
%2 = begin_access [modify] [dynamic] %1 : $*Int
237
237
%3 = ref_element_addr %0 : $ClassWithStoredProperty, #ClassWithStoredProperty.f
238
238
239
- // expected-warning @+1{{modification requires exclusive access }}
239
+ // expected-note @+1{{conflicting access is here }}
240
240
%4 = begin_access [modify] [dynamic] %3 : $*Int
241
241
end_access %4 : $*Int
242
242
end_access %2 : $*Int
@@ -252,11 +252,11 @@ bb0(%0 : $ClassWithStoredProperty):
252
252
%2 = begin_borrow %0 : $ClassWithStoredProperty
253
253
%3 = ref_element_addr %1 : $ClassWithStoredProperty, #ClassWithStoredProperty.f
254
254
255
- // expected-note @+1{{conflicting modification requires exclusive access}}
255
+ // expected-warning @+1{{simultaneous accesses to var 'f'; modification requires exclusive access}}
256
256
%4 = begin_access [modify] [dynamic] %3 : $*Int
257
257
%5 = ref_element_addr %2 : $ClassWithStoredProperty, #ClassWithStoredProperty.f
258
258
259
- // expected-warning @+1{{modification requires exclusive access }}
259
+ // expected-note @+1{{conflicting access is here }}
260
260
%6 = begin_access [modify] [dynamic] %5 : $*Int
261
261
end_access %6 : $*Int
262
262
end_access %4 : $*Int
@@ -279,8 +279,8 @@ bb0(%0 : $Int):
279
279
store %0 to [trivial] %3 : $*Int
280
280
%4 = copy_value %2 : ${ var Int }
281
281
%5 = project_box %4 : ${ var Int }, 0
282
- %6 = begin_access [modify] [unknown] %3 : $*Int // expected-note {{conflicting modification requires exclusive access}}
283
- %7 = begin_access [modify] [unknown] %5 : $*Int // expected-warning {{modification requires exclusive access }}
282
+ %6 = begin_access [modify] [unknown] %3 : $*Int // expected-warning {{simultaneous accesses; modification requires exclusive access}}
283
+ %7 = begin_access [modify] [unknown] %5 : $*Int // expected-note {{conflicting access is here }}
284
284
end_access %7 : $*Int
285
285
end_access %6: $*Int
286
286
destroy_value %2 : ${ var Int }
@@ -297,8 +297,8 @@ bb0(%0 : $Int):
297
297
%3 = project_box %2 : ${ var Int }, 0
298
298
store %0 to [trivial] %3 : $*Int
299
299
%4 = project_box %2 : ${ var Int }, 0
300
- %5 = begin_access [modify] [unknown] %3 : $*Int // expected-note {{conflicting modification requires exclusive access}}
301
- %6 = begin_access [modify] [unknown] %4 : $*Int // expected-warning {{modification requires exclusive access }}
300
+ %5 = begin_access [modify] [unknown] %3 : $*Int // expected-warning {{simultaneous accesses; modification requires exclusive access}}
301
+ %6 = begin_access [modify] [unknown] %4 : $*Int // expected-note {{conflicting access is here }}
302
302
end_access %6 : $*Int
303
303
end_access %5: $*Int
304
304
destroy_value %2 : ${ var Int }
@@ -315,8 +315,8 @@ sil hidden @modifySameGlobal : $@convention(thin) (Int) -> () {
315
315
bb0(%0 : $Int):
316
316
%1 = global_addr @global1 :$*Int
317
317
%2 = global_addr @global1 :$*Int
318
- %3 = begin_access [modify] [unknown] %1 : $*Int // expected-note {{conflicting modification requires exclusive access}}
319
- %4 = begin_access [modify] [unknown] %2 : $*Int // expected-warning {{modification requires exclusive access }}
318
+ %3 = begin_access [modify] [unknown] %1 : $*Int // expected-warning {{simultaneous accesses; modification requires exclusive access}}
319
+ %4 = begin_access [modify] [unknown] %2 : $*Int // expected-note {{conflicting access is here }}
320
320
end_access %4 : $*Int
321
321
end_access %3: $*Int
322
322
%5 = tuple ()
@@ -347,8 +347,8 @@ bb0(%0 : $Int):
347
347
%3 = project_box %2 : ${ var Int }, 0
348
348
store %0 to [trivial] %3 : $*Int
349
349
%4 = function_ref @takesTwoInouts : $@convention(thin) (@inout Int, @inout Int) -> ()
350
- %5 = begin_access [read] [unknown] %3 : $*Int // expected-note {{conflicting read requires shared access }}
351
- %6 = begin_access [modify] [unknown] %3 : $*Int // expected-warning {{modification requires exclusive access}}
350
+ %5 = begin_access [read] [unknown] %3 : $*Int // expected-note {{conflicting access is here }}
351
+ %6 = begin_access [modify] [unknown] %3 : $*Int // expected-warning {{simultaneous accesses; modification requires exclusive access}}
352
352
%7 = begin_access [read] [unknown] %3 : $*Int // no-error
353
353
%8 = apply %4(%5, %6) : $@convention(thin) (@inout Int, @inout Int) -> ()
354
354
end_access %7 : $*Int
@@ -368,8 +368,8 @@ bb0(%0 : $Int):
368
368
%3 = project_box %2 : ${ var Int }, 0
369
369
store %0 to [trivial] %3 : $*Int
370
370
%4 = function_ref @takesTwoInouts : $@convention(thin) (@inout Int, @inout Int) -> ()
371
- %5 = begin_access [modify] [unknown] %3 : $*Int // expected-note {{conflicting modification requires exclusive access}}
372
- %6 = begin_access [modify] [unknown] %3 : $*Int // expected-warning {{modification requires exclusive access }}
371
+ %5 = begin_access [modify] [unknown] %3 : $*Int // expected-warning {{simultaneous accesses; modification requires exclusive access}}
372
+ %6 = begin_access [modify] [unknown] %3 : $*Int // expected-note {{conflicting access is here }}
373
373
%7 = begin_access [modify] [unknown] %3 : $*Int // no-error
374
374
%8 = apply %4(%5, %6) : $@convention(thin) (@inout Int, @inout Int) -> ()
375
375
end_access %7 : $*Int
@@ -392,8 +392,8 @@ bb0(%0 : $Int):
392
392
%4 = function_ref @takesTwoInouts : $@convention(thin) (@inout Int, @inout Int) -> ()
393
393
%5 = begin_access [modify] [unknown] %3 : $*Int // no-note
394
394
end_access %5 : $*Int
395
- %6 = begin_access [modify] [unknown] %3 : $*Int // expected-note {{conflicting modification requires exclusive access}}
396
- %7 = begin_access [modify] [unknown] %3 : $*Int // expected-warning {{modification requires exclusive access }}
395
+ %6 = begin_access [modify] [unknown] %3 : $*Int // expected-warning {{simultaneous accesses; modification requires exclusive access}}
396
+ %7 = begin_access [modify] [unknown] %3 : $*Int // expected-note {{conflicting access is here }}
397
397
%8 = apply %4(%5, %6) : $@convention(thin) (@inout Int, @inout Int) -> ()
398
398
end_access %7 : $*Int
399
399
end_access %6: $*Int
0 commit comments