@@ -311,6 +311,34 @@ WARNING(warn_dead_weak_store,none,
311
311
" weak reference will always be nil because the referenced object is "
312
312
" deallocated here" , ())
313
313
314
+ // performance diagnostics
315
+ ERROR(performance_annotations_not_enabled,none,
316
+ " use -experimental-performance-annotations to enable performance annotations" , ())
317
+ ERROR(performance_dynamic_casting,none,
318
+ " dynamic casting can lock or allocate" , ())
319
+ ERROR(performance_metadata,none,
320
+ " %0 can cause metadata allocation or locks" , (StringRef))
321
+ ERROR(performance_metadata_type,none,
322
+ " Using type %0 can cause metadata allocation or locks" , (Type))
323
+ ERROR(performance_allocating,none,
324
+ " %0 can cause an allocation" , (StringRef))
325
+ ERROR(performance_deallocating,none,
326
+ " %0 can cause an deallocation" , (StringRef))
327
+ ERROR(performance_deallocating_type,none,
328
+ " %0 a value of type %1 can cause a deallocation" , (StringRef, Type))
329
+ ERROR(performance_locking,none,
330
+ " %0 can cause locking" , (StringRef))
331
+ ERROR(performance_arc,none,
332
+ " this code performs reference counting operations which can cause locking" , ())
333
+ ERROR(performance_objectivec,none,
334
+ " calls of Objective-C methods can have unpredictable performance" , ())
335
+ ERROR(performance_unknown_callees,none,
336
+ " called function is not known at compile time and can have unpredictable performance" , ())
337
+ ERROR(performance_callee_unavailable,none,
338
+ " called function is not availbale in this module and can have unpredictable performance" , ())
339
+ NOTE(performance_called_from,none,
340
+ " called from here" , ())
341
+
314
342
// 'transparent' diagnostics
315
343
ERROR(circular_transparent,none,
316
344
" inlining 'transparent' functions forms circular loop" , ())
0 commit comments