[cfe-dev] FunctionDecls by typedef crash the C++ front-end

Argiris Kirtzidis akyrtzi at gmail.com
Thu Oct 23 18:37:20 PDT 2008


e.g:

typedef void fn(int);
fn f;

There are no ParmVarDecls created for the 'f' FunctionDecl, and I assume 
this is intended to save space.
This crashes the C++ front-end when trying to use the ParmVarDecls 
(mostly for handling default args).

In C there is no problem since ParmVarDecls are used only for 
definitions, otherwise FunctionTypeProto is used

-Argiris



More information about the cfe-dev mailing list