[cfe-dev] ParamDecls missing from function DeclContext

Abramo Bagnara abramo.bagnara at gmail.com
Tue May 15 00:40:05 PDT 2012


Il 15/05/2012 05:52, Douglas Gregor ha scritto:
> 
> On May 14, 2012, at 8:34 AM, Abramo Bagnara wrote:
> 
>>
>> I've just verified that:
>>
>> 1) anonymous parameters are not added to its function definition DeclContext
>>
>> 2) parameters are not added to its function declaration DeclContext
>>
>> Are both 1 and 2 deliberate choices?
> 
> No, I don't think they are deliberate choices.

Ok, we'll provide a fix for this.

Another much related issue is shown by the following:

void sort(int (*compare)(int x, int y), int* x);

Which should be the correct context of ParmVarDecl's inside FunctionType
(i.e. int x and int y)?



More information about the cfe-dev mailing list