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
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits


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

Reply via email to