[PATCH] Properly handle function attributes in grouping parentheses

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Properly handle function attributes in grouping parentheses

Charles Davis-3
Hi,

This patch is supposed to fix the other part of PR6408, by adding a
special type of DeclaratorChunk (as suggested by John McCall) and
attaching any attributes inside to that chunk. Then, Sema finds the
chunk and applies the attributes to the appropriate type.

Unfortunately, this patch has several major problems. In its current
state, it breaks two C++ test (test/CXX/special/class.ctor/p1.cpp and
test/SemaCXX/constructor.cpp). The first one is some weird interaction
between templates and my new code.

The second one uses two pairs of grouping parentheses on a constructor.
This confuses my code. All of my attempts to solve this just break more
tests--even so far as causing crashes! :(

Chip

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

pr6408-fix-2.patch (12K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Properly handle function attributes in grouping parentheses

Charles Davis-3
Ping...

On 3/1/10 7:29 AM, Charles Davis wrote:

> Hi,
>
> This patch is supposed to fix the other part of PR6408, by adding a
> special type of DeclaratorChunk (as suggested by John McCall) and
> attaching any attributes inside to that chunk. Then, Sema finds the
> chunk and applies the attributes to the appropriate type.
>
> Unfortunately, this patch has several major problems. In its current
> state, it breaks two C++ test (test/CXX/special/class.ctor/p1.cpp and
> test/SemaCXX/constructor.cpp). The first one is some weird interaction
> between templates and my new code.
>
> The second one uses two pairs of grouping parentheses on a constructor.
> This confuses my code. All of my attempts to solve this just break more
> tests--even so far as causing crashes! :(
>
> Chip

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Properly handle function attributes in grouping parentheses

John McCall
On Mar 16, 2010, at 10:05 PM, Charles Davis wrote:
> Ping...

Hey, Charles.  I'm not sure what response you're hoping for;  it sounds like your patch just doesn't work yet.  It's possible that my idea was bad, but I can't really tell without basically debugging the patch, which I'm afraid I haven't had the time to do and won't in the near future.

Perhaps breaking down the functionality more would help?  First test that your new DeclaratorChunk doesn't introduce problems on its own (without storing attributes in it), then implement attributes on top of that.

Sorry I couldn't help more.  Good luck!

John.

> On 3/1/10 7:29 AM, Charles Davis wrote:
>> Hi,
>>
>> This patch is supposed to fix the other part of PR6408, by adding a
>> special type of DeclaratorChunk (as suggested by John McCall) and
>> attaching any attributes inside to that chunk. Then, Sema finds the
>> chunk and applies the attributes to the appropriate type.
>>
>> Unfortunately, this patch has several major problems. In its current
>> state, it breaks two C++ test (test/CXX/special/class.ctor/p1.cpp and
>> test/SemaCXX/constructor.cpp). The first one is some weird interaction
>> between templates and my new code.
>>
>> The second one uses two pairs of grouping parentheses on a constructor.
>> This confuses my code. All of my attempts to solve this just break more
>> tests--even so far as causing crashes! :(
>>
>> Chip
>
> _______________________________________________
> cfe-dev mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev