[cfe-commits] [PATCH] Thread-safety analysis: Allow mutex expressions where the type is forward-declared, and thus not LOCKABLE.

Richard Smith richard at metafoo.co.uk
Wed Feb 15 13:36:08 PST 2012


On Wed, Feb 15, 2012 at 1:17 PM, Richard Smith <richard at metafoo.co.uk>wrote:

> On Wed, Feb 15, 2012 at 12:09 PM, Delesley Hutchins <delesley at google.com>wrote:
>
>> This is a simple fix that allows mutex expressions to refer to types
>> that are forward-declared, and thus not lockable.
>>
>>  http://codereview.appspot.com/5672057/
>>
>
> Hi Delesley,
>
> I've made a couple of minor comments on the codereview tool. Regarding the
> new diagnostic, how about something like: "GCC requires function attribute
> '%0' to be written at the start of the function definition"? Also, I'd
> prefer for this warning to live under a switch like -Wgcc-compat rather
> than -Wattributes.
>

The new diagnostic seems to miss some cases; we're not diagnosing this:

  void f() __attribute__((noreturn)) { f(); }

- Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120215/0571a26d/attachment.html>


More information about the cfe-commits mailing list