Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 //==--- DiagnosticSemaKinds.td - libsema diagnostics ----------------------===// | 1 //==--- DiagnosticSemaKinds.td - libsema diagnostics ----------------------===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 | 9 |
10 //===----------------------------------------------------------------------===// | 10 //===----------------------------------------------------------------------===// |
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
565 def error_dynamic_property_ivar_decl : Error< | 565 def error_dynamic_property_ivar_decl : Error< |
566 "dynamic property can not have ivar specification">; | 566 "dynamic property can not have ivar specification">; |
567 def error_duplicate_ivar_use : Error< | 567 def error_duplicate_ivar_use : Error< |
568 "synthesized properties %0 and %1 both claim ivar %2">; | 568 "synthesized properties %0 and %1 both claim ivar %2">; |
569 def error_property_implemented : Error<"property %0 is already implemented">; | 569 def error_property_implemented : Error<"property %0 is already implemented">; |
570 def warn_objc_property_attr_mutually_exclusive : Warning< | 570 def warn_objc_property_attr_mutually_exclusive : Warning< |
571 "property attributes '%0' and '%1' are mutually exclusive">, | 571 "property attributes '%0' and '%1' are mutually exclusive">, |
572 InGroup<ReadOnlySetterAttrs>, DefaultIgnore; | 572 InGroup<ReadOnlySetterAttrs>, DefaultIgnore; |
573 def warn_objc_missing_super_dealloc : Warning< | 573 def warn_objc_missing_super_dealloc : Warning< |
574 "method possibly missing a [super dealloc] call">, | 574 "method possibly missing a [super dealloc] call">, |
575 InGroup<ObjCMissingSuperCalls>; | |
576 def warn_objc_missing_super_finalize : Warning< | |
577 "method possibly missing a [super finalize] call">, | |
575 InGroup<ObjCMissingSuperCalls>; | 578 InGroup<ObjCMissingSuperCalls>; |
576 def warn_undeclared_selector : Warning< | 579 def warn_undeclared_selector : Warning< |
577 "undeclared selector %0">, InGroup<UndeclaredSelector>, DefaultIgnore; | 580 "undeclared selector %0">, InGroup<UndeclaredSelector>, DefaultIgnore; |
578 def warn_implicit_atomic_property : Warning< | 581 def warn_implicit_atomic_property : Warning< |
579 "property is assumed atomic by default">, InGroup<ImplicitAtomic>, DefaultIgno re; | 582 "property is assumed atomic by default">, InGroup<ImplicitAtomic>, DefaultIgno re; |
580 def warn_auto_implicit_atomic_property : Warning< | 583 def warn_auto_implicit_atomic_property : Warning< |
581 "property is assumed atomic when auto-synthesizing the property">,· | 584 "property is assumed atomic when auto-synthesizing the property">,· |
582 InGroup<ImplicitAtomic>, DefaultIgnore; | 585 InGroup<ImplicitAtomic>, DefaultIgnore; |
583 def warn_unimplemented_selector: Warning< | 586 def warn_unimplemented_selector: Warning< |
584 "unimplemented selector %0">, InGroup<Selector>, DefaultIgnore; | 587 "unimplemented selector %0">, InGroup<Selector>, DefaultIgnore; |
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1378 "1:can only be 1, since there is one parameter|" | 1381 "1:can only be 1, since there is one parameter|" |
1379 ":must be between 1 and %2}2">; | 1382 ":must be between 1 and %2}2">; |
1380 def err_attribute_argument_not_lockable : Error< | 1383 def err_attribute_argument_not_lockable : Error< |
1381 "%0 attribute requires arguments whose type is annotated " | 1384 "%0 attribute requires arguments whose type is annotated " |
1382 "with 'lockable' attribute">; | 1385 "with 'lockable' attribute">; |
1383 def err_attribute_decl_not_lockable : Error< | 1386 def err_attribute_decl_not_lockable : Error< |
1384 "%0 attribute can only be applied in a context annotated " | 1387 "%0 attribute can only be applied in a context annotated " |
1385 "with 'lockable' attribute">; | 1388 "with 'lockable' attribute">; |
1386 def warn_unlock_but_no_acquire : Warning< | 1389 def warn_unlock_but_no_acquire : Warning< |
1387 "unlocking '%0' that was not acquired">, | 1390 "unlocking '%0' that was not acquired">, |
1388 InGroup<DiagGroup<"thread-safety">>, DefaultIgnore; | 1391 InGroup<ThreadSafety>, DefaultIgnore; |
1389 def warn_double_lock : Warning< | 1392 def warn_double_lock : Warning< |
1390 "locking '%0' that is already acquired">, | 1393 "locking '%0' that is already acquired">, |
1391 InGroup<DiagGroup<"thread-safety">>, DefaultIgnore; | 1394 InGroup<ThreadSafety>, DefaultIgnore; |
1392 def warn_function_requires_lock : Warning< | 1395 def warn_function_requires_lock : Warning< |
1393 "calling function '%0' requires lock '%0'">, | 1396 "calling function '%0' requires lock '%0'">, |
1394 InGroup<DiagGroup<"thread-safety">>, DefaultIgnore; | 1397 InGroup<ThreadSafety>, DefaultIgnore; |
1395 def warn_locks_not_released : Warning< | 1398 def warn_locks_not_released : Warning< |
1396 "lock '%0' is not released at the end of function '%1'">, | 1399 "lock '%0' is not released at the end of function '%1'">, |
1397 InGroup<DiagGroup<"thread-safety">>, DefaultIgnore; | 1400 InGroup<ThreadSafety>, DefaultIgnore; |
1398 def warn_lock_not_released_in_scope : Warning< | 1401 def warn_lock_not_released_in_scope : Warning< |
1399 "lock '%0' is not released at the end of its scope">, | 1402 "lock '%0' is not released at the end of its scope">, |
1400 InGroup<DiagGroup<"thread-safety">>, DefaultIgnore; | 1403 InGroup<ThreadSafety>, DefaultIgnore; |
1401 def warn_expecting_lock_held_on_loop : Warning< | 1404 def warn_expecting_lock_held_on_loop : Warning< |
1402 "expecting lock '%0' to be held at start of each loop">, | 1405 "expecting lock '%0' to be %select{held|held exclusively}1 at start of each " |
Jeffrey Yasskin
2011/08/26 19:20:47
What happens if someone changes whether a lock is
supertri
2011/09/01 18:47:08
Good point. Right now, nothing. I am adding some l
| |
1403 InGroup<DiagGroup<"thread-safety">>, DefaultIgnore; | 1406 "loop">, |
1407 InGroup<ThreadSafety>, DefaultIgnore; | |
1408 def warn_lock_exclusive_and_shared : Warning< | |
1409 "lock '%0' is held exclusively and shared in the same scope">, | |
1410 InGroup<ThreadSafety>, DefaultIgnore; | |
1411 def note_lock_exclusive_and_shared : Note< | |
1412 "the other acquire of lock '%0' is here">, | |
1413 InGroup<ThreadSafety>, DefaultIgnore; | |
1404 def warn_variable_requires_lock : Warning< | 1414 def warn_variable_requires_lock : Warning< |
1405 "%select{reading|writing}2 variable '%0' requires lock '%1' to be " | 1415 "%select{reading|writing}2 variable '%0' requires lock '%1' to be " |
1406 "%select{held|held exclusively}2">, | 1416 "%select{held|held exclusively}2">, |
1407 InGroup<DiagGroup<"thread-safety">>, DefaultIgnore; | 1417 InGroup<ThreadSafety>, DefaultIgnore; |
1408 def warn_variable_requires_any_lock : Warning< | 1418 def warn_variable_requires_any_lock : Warning< |
1409 "accessing variable '%0' requires some lock">, | 1419 "accessing variable '%0' requires some lock">, |
1410 InGroup<DiagGroup<"thread-safety">>, DefaultIgnore; | 1420 InGroup<ThreadSafety>, DefaultIgnore; |
1411 def warn_var_deref_requires_lock : Warning< | 1421 def warn_var_deref_requires_lock : Warning< |
1412 "%select{reading|writing}2 dereferenced variable '%0' requires lock '%1' to " | 1422 "%select{reading|writing}2 the value pointed to by '%0' requires lock '%1' to" |
1413 "be %select{held|held exclusively}2">, | 1423 " be %select{held|held exclusively}2">, |
1414 InGroup<DiagGroup<"thread-safety">>, DefaultIgnore; | 1424 InGroup<ThreadSafety>, DefaultIgnore; |
1415 def warn_var_deref_requires_any_lock : Warning< | 1425 def warn_var_deref_requires_any_lock : Warning< |
1416 "accessing dereferenced variable '%0' requires some lock">, | 1426 "accessing the value pointed to by '%0' requires some lock">, |
1417 InGroup<DiagGroup<"thread-safety">>, DefaultIgnore; | 1427 InGroup<ThreadSafety>, DefaultIgnore; |
1418 def warn_fun_requires_lock : Warning< | |
1419 "calling function '%0' requires %select{shared|exclusive}2 lock '%1'">, | |
Jeffrey Yasskin
2011/08/26 19:20:47
Is it possible to separate the lock-required annot
supertri
2011/09/01 18:47:08
Yes. I will experiment with git add --patch.
| |
1420 InGroup<DiagGroup<"thread-safety">>, DefaultIgnore; | |
1421 def warn_fun_excludes_lock : Warning< | |
1422 "cannot call function '%0' while holding lock '%1'">, | |
1423 InGroup<DiagGroup<"thread-safety">>, DefaultIgnore; | |
1424 | 1428 |
1425 | 1429 |
1426 def warn_impcast_vector_scalar : Warning< | 1430 def warn_impcast_vector_scalar : Warning< |
1427 "implicit conversion turns vector to scalar: %0 to %1">, | 1431 "implicit conversion turns vector to scalar: %0 to %1">, |
1428 InGroup<DiagGroup<"conversion">>, DefaultIgnore; | 1432 InGroup<DiagGroup<"conversion">>, DefaultIgnore; |
1429 def warn_impcast_complex_scalar : Warning< | 1433 def warn_impcast_complex_scalar : Warning< |
1430 "implicit conversion discards imaginary component: %0 to %1">, | 1434 "implicit conversion discards imaginary component: %0 to %1">, |
1431 InGroup<DiagGroup<"conversion">>, DefaultIgnore; | 1435 InGroup<DiagGroup<"conversion">>, DefaultIgnore; |
1432 def warn_impcast_float_precision : Warning< | 1436 def warn_impcast_float_precision : Warning< |
1433 "implicit conversion loses floating-point precision: %0 to %1">, | 1437 "implicit conversion loses floating-point precision: %0 to %1">, |
(...skipping 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2865 "because type %0 has %select{no|no|__strong|__weak|__autoreleasing}1 " | 2869 "because type %0 has %select{no|no|__strong|__weak|__autoreleasing}1 " |
2866 "ownership">; | 2870 "ownership">; |
2867 def warn_arc_object_memaccess : Warning< | 2871 def warn_arc_object_memaccess : Warning< |
2868 "%select{destination for|source of}0 this %1 call is a pointer to " | 2872 "%select{destination for|source of}0 this %1 call is a pointer to " |
2869 "ownership-qualified type %2">, InGroup<ARCNonPodMemAccess>; | 2873 "ownership-qualified type %2">, InGroup<ARCNonPodMemAccess>; |
2870 | 2874 |
2871 def err_arc_strong_property_ownership : Error< | 2875 def err_arc_strong_property_ownership : Error< |
2872 "existing ivar %1 for strong property %0 may not be " | 2876 "existing ivar %1 for strong property %0 may not be " |
2873 "%select{|__unsafe_unretained||__weak}2">; | 2877 "%select{|__unsafe_unretained||__weak}2">; |
2874 def err_arc_assign_property_ownership : Error< | 2878 def err_arc_assign_property_ownership : Error< |
2875 "existing ivar %1 for unsafe_unretained property %0 must be __unsafe_unretaine d">; | 2879 "existing ivar %1 for property %0 with %select{unsafe_unretained| assign}2 " |
2880 "attribute must be __unsafe_unretained">; | |
2876 def err_arc_inconsistent_property_ownership : Error< | 2881 def err_arc_inconsistent_property_ownership : Error< |
2877 "%select{strong|weak|unsafe_unretained}1 property %0 may not also be " | 2882 "%select{strong|weak|unsafe_unretained}1 property %0 may not also be " |
2878 "declared %select{|__unsafe_unretained|__strong|__weak|__autoreleasing}2">; | 2883 "declared %select{|__unsafe_unretained|__strong|__weak|__autoreleasing}2">; |
2879 def err_arc_atomic_ownership : Error< | 2884 def err_arc_atomic_ownership : Error< |
2880 "cannot perform atomic operation on a pointer to type %0: type has " | 2885 "cannot perform atomic operation on a pointer to type %0: type has " |
2881 "non-trivial ownership">; | 2886 "non-trivial ownership">; |
2882 | 2887 |
2883 def err_arc_bridge_cast_incompatible : Error< | 2888 def err_arc_bridge_cast_incompatible : Error< |
2884 "incompatible types casting %0 to %1 with a %select{__bridge|" | 2889 "incompatible types casting %0 to %1 with a %select{__bridge|" |
2885 "__bridge_transfer|__bridge_retained}2 cast">; | 2890 "__bridge_transfer|__bridge_retained}2 cast">; |
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3385 def warn_objc_pointer_cxx_catch_fragile : Warning< | 3390 def warn_objc_pointer_cxx_catch_fragile : Warning< |
3386 "can not catch an exception thrown with @throw in C++ in the non-unified " | 3391 "can not catch an exception thrown with @throw in C++ in the non-unified " |
3387 "exception model">, InGroup<ObjCNonUnifiedException>; | 3392 "exception model">, InGroup<ObjCNonUnifiedException>; |
3388 def err_objc_object_catch : Error< | 3393 def err_objc_object_catch : Error< |
3389 "can't catch an Objective C object by value">; | 3394 "can't catch an Objective C object by value">; |
3390 def err_incomplete_type_objc_at_encode : Error< | 3395 def err_incomplete_type_objc_at_encode : Error< |
3391 "'@encode' of incomplete type %0">; | 3396 "'@encode' of incomplete type %0">; |
3392 | 3397 |
3393 def warn_setter_getter_impl_required : Warning< | 3398 def warn_setter_getter_impl_required : Warning< |
3394 "property %0 requires method %1 to be defined - " | 3399 "property %0 requires method %1 to be defined - " |
3395 "use @synthesize, @dynamic or provide a method implementation">; | 3400 "use @synthesize, @dynamic or provide a method implementation " |
3401 "in this class implementation">; | |
3396 def warn_setter_getter_impl_required_in_category : Warning< | 3402 def warn_setter_getter_impl_required_in_category : Warning< |
3397 "property %0 requires method %1 to be defined - " | 3403 "property %0 requires method %1 to be defined - " |
3398 "use @dynamic or provide a method implementation in category">; | 3404 "use @dynamic or provide a method implementation in this category">; |
3399 def note_property_impl_required : Note< | 3405 def note_property_impl_required : Note< |
3400 "implementation is here">; | 3406 "implementation is here">; |
3401 def note_parameter_named_here : Note< | 3407 def note_parameter_named_here : Note< |
3402 "passing argument to parameter %0 here">; | 3408 "passing argument to parameter %0 here">; |
3403 def note_parameter_here : Note< | 3409 def note_parameter_here : Note< |
3404 "passing argument to parameter here">; | 3410 "passing argument to parameter here">; |
3405 | 3411 |
3406 // C++ casts | 3412 // C++ casts |
3407 // These messages adhere to the TryCast pattern: %0 is an int specifying the | 3413 // These messages adhere to the TryCast pattern: %0 is an int specifying the |
3408 // cast type, %1 is the source type, %2 is the destination type. | 3414 // cast type, %1 is the source type, %2 is the destination type. |
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4245 "array %0 declared here">; | 4251 "array %0 declared here">; |
4246 | 4252 |
4247 def warn_printf_write_back : Warning< | 4253 def warn_printf_write_back : Warning< |
4248 "use of '%%n' in format string discouraged (potentially insecure)">, | 4254 "use of '%%n' in format string discouraged (potentially insecure)">, |
4249 InGroup<FormatSecurity>; | 4255 InGroup<FormatSecurity>; |
4250 def warn_printf_insufficient_data_args : Warning< | 4256 def warn_printf_insufficient_data_args : Warning< |
4251 "more '%%' conversions than data arguments">, InGroup<Format>; | 4257 "more '%%' conversions than data arguments">, InGroup<Format>; |
4252 def warn_printf_data_arg_not_used : Warning< | 4258 def warn_printf_data_arg_not_used : Warning< |
4253 "data argument not used by format string">, InGroup<FormatExtraArgs>; | 4259 "data argument not used by format string">, InGroup<FormatExtraArgs>; |
4254 def warn_format_invalid_conversion : Warning< | 4260 def warn_format_invalid_conversion : Warning< |
4255 "invalid conversion specifier '%0'">, InGroup<Format>; | 4261 "invalid conversion specifier '%0'">, InGroup<FormatInvalidSpecifier>; |
4256 def warn_printf_incomplete_specifier : Warning< | 4262 def warn_printf_incomplete_specifier : Warning< |
4257 "incomplete format specifier">, InGroup<Format>; | 4263 "incomplete format specifier">, InGroup<Format>; |
4258 def warn_missing_format_string : Warning< | 4264 def warn_missing_format_string : Warning< |
4259 "format string missing">, InGroup<Format>; | 4265 "format string missing">, InGroup<Format>; |
4260 def warn_scanf_nonzero_width : Warning< | 4266 def warn_scanf_nonzero_width : Warning< |
4261 "zero field width in scanf format string is unused">, | 4267 "zero field width in scanf format string is unused">, |
4262 InGroup<Format>; | 4268 InGroup<Format>; |
4263 def warn_printf_conversion_argument_type_mismatch : Warning< | 4269 def warn_printf_conversion_argument_type_mismatch : Warning< |
4264 "conversion specifies type %0 but the argument has type %1">, | 4270 "conversion specifies type %0 but the argument has type %1">, |
4265 InGroup<Format>; | 4271 InGroup<Format>; |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4650 "overridden method is part of the '%select{|alloc|copy|init|mutableCopy|" | 4656 "overridden method is part of the '%select{|alloc|copy|init|mutableCopy|" |
4651 "new|autorelease|dealloc|release|retain|retainCount|self}0' method family">; | 4657 "new|autorelease|dealloc|release|retain|retainCount|self}0' method family">; |
4652 def note_related_result_type_inferred : Note< | 4658 def note_related_result_type_inferred : Note< |
4653 "%select{class|instance}0 method %1 is assumed to return an instance of " | 4659 "%select{class|instance}0 method %1 is assumed to return an instance of " |
4654 "its receiver type (%2)">; | 4660 "its receiver type (%2)">; |
4655 | 4661 |
4656 } | 4662 } |
4657 | 4663 |
4658 } // end of sema component. | 4664 } // end of sema component. |
4659 | 4665 |
LEFT | RIGHT |