[cfe-commits] [PATCH] Delayed parsing for GNU attributes
Douglas Gregor
dgregor at apple.com
Wed Sep 7 11:24:59 PDT 2011
On Sep 2, 2011, at 11:25 AM, Delesley Hutchins wrote:
> Updated patch which fixes a few coding style issues.
>
> On Thu, Sep 1, 2011 at 1:40 PM, Delesley Hutchins <delesley at google.com> wrote:
>> This patch implements delayed parsing for GNU attributes. The main
>> motivation for this patch is to implement thread safety attributes,
>> such as the following:
>>
>> class Foo {
>> int x __attribute__((guarded_by(mu)));
>> int foo() __attribute__((exclusive_locks_required(mu)));
>> Mutex mu;
>> }
>>
>> Delayed parsing is now turned on for any GNU attribute that specifies
>> LateParsed=1 in Attr.td. Note that support for delayed parsing is
>> incomplete, in that it is only enabled for attributes at the end of a
>> member declaration; this is due to a limitation in the current
>> implementation that we hope to remove at some point.
>>
>> Patches for llvm and clang are attached, and can also be found at:
>>
>> http://codereview.appspot.com/4975048/
>> http://codereview.appspot.com/4975049/
This looks great, thanks!
- Doug
More information about the cfe-commits
mailing list