[cfe-commits] [PATCH] FunctionTypeLoc local source range

Enea Zaffanella zaffanella at cs.unipr.it
Mon Oct 1 10:20:37 PDT 2012


Ping^2.

On 09/25/2012 07:12 PM, Enea Zaffanella wrote:
> Ping.
>
> On 09/18/2012 02:48 PM, Enea Zaffanella wrote:
>> Please find attached a patch for review.
>>
>> The patch implements two changes in the TypeLoc area:
>>
>> 1) it enhances FunctionTypeLoc by adding locations for left and right
>> parentheses; these are needed by client applications and, in C++, may
>> differ from the local start/end source locations.
>>
>> 2) it fixes the computation of the local start/end source location of a
>> FunctionProtoTypeLoc, taking into account the case of a trailing return
>> type. For a function having a trailing return type, the local start
>> location is set to the `auto' keyword and the local end location is set
>> to the location of `->'.
>>
>> Regarding 2, the following code can be used to show that the source
>> location info currently computed by clang is suboptimal:
>>
>> void foo() {
>>    _Generic(true, auto (*)()->int : 1, auto (*)()->int : 2);
>> }
>>
>> (Side note: how can we turn this into a proper testcase? Are there
>> expected-error variants checking for source location ranges?)
>>
>> Enea.
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>




More information about the cfe-commits mailing list