[cfe-commits] [PATCH] Thread-safety analysis: downgrade lockable requirement from error to warning.
delesley at google.com
Thu Mar 22 08:10:50 PDT 2012
Good idea; will do.
On Wed, Mar 21, 2012 at 5:20 PM, Richard Smith <richard at metafoo.co.uk>wrote:
> LGTM; one trivial comment added to codereview.
> I also have some suggestions for diagnostic wording, but they're unrelated
> to the patch itself:
> def warn_attribute_argument_not_lockable : Warning< "%0 attribute
> requires arguments whose type is annotated " "with 'lockable'
> attribute">, InGroup<ThreadSafety>, DefaultIgnore;
> It would be useful for this diagnostic to point at the problematic
> argument and mention its type: "'guarded_by' attribute argument type
> 'MyMutex' is not annotated with 'lockable' attribute"
> def warn_attribute_argument_not_class : Warning< "%0 attribute requires
> arguments that are class type or point to class type">, InGroup<ThreadSafety>,
> This would read more naturally as "requires arguments that are of class
> type or pointer to class type". It would be useful to include the type here
> On Thu, Mar 15, 2012 at 9:26 AM, Delesley Hutchins <delesley at google.com>wrote:
>> This patch downgrades the requirement that mutex expressions must
>> refer to lockable objects from an error message to a warning. The
>> rest of the thread safety analysis works fine even if the class is not
>> lockable, so there is no reason to break the build just because a
>> class is missing the LOCKABLE attribute.
>> DeLesley Hutchins | Software Engineer | delesley at google.com |
DeLesley Hutchins | Software Engineer | delesley at google.com | 505-206-0315
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits