llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

FunctionDecls by typedef crash the C++ front-end

Open akyrtzi opened this issue 18 years ago • 2 comments

Bugzilla Link 2942
Resolution FIXED
Resolved on Mar 12, 2010 00:57
Version unspecified
OS Windows XP
CC @DougGregor

Extended Description

e.g:

typedef void fn(int); fn f;

There are no ParmVarDecls created for the 'f' FunctionDecl, and it 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.

akyrtzi avatar Oct 24 '08 19:10 akyrtzi

Fixed on the trunk.

DougGregor avatar Oct 24 '08 20:10 DougGregor

I'll take this one.

DougGregor avatar Oct 24 '08 19:10 DougGregor