On Mon, May 06, 2013 at 12:23:07PM -0400, Jason Merrill wrote: > On 05/06/2013 11:04 AM, Jakub Jelinek wrote: > >isn't it too invasive to the C++ FE? > > It is pretty invasive. Why not put the information in > cp_declarator, as you suggested in your earlier email? You could > even put it in the attributes field.
I did it that way because if I understand the code well, often grokdeclarator/start_decl/start_function/grokmethod/grokfield is called with a chain of declarators, not just a single one. On which declarator shall I put the vector? The first one, all of them? And, if on the first one, grokdeclarator would need to save it in some local variable again, because for (; declarator; declarator = declarator->declarator) ... loop is done before the grokfndecl calls. So I thought passing extra parameter might be easier. But I might be misreading the code... Jakub