[cfe-dev] clang::CompoundLiteral::getInitializer() should use cast_or_null() (or I am missing something)
Chris Lattner
clattner at apple.com
Tue Dec 16 22:59:21 PST 2008
On Dec 16, 2008, at 1:21 PM, Paolo Bolzoni wrote:
> dear list,
>
> I am working with .c files that uses the GNU extensions, in particular
> the diag::ext_gnu_empty_initializer related extension.
>
> Unfortunately this means the Stmt* Init of the class may be zero.
>
> When it is the case getInitializer() crashes because cast() is not
> meant
> to be used on null pointers.
>
> It really seems a bug, but I am not posting a bug report because I
> read
> in the class body this intriguing comment:
> // FIXME: Init should never be null.
>
> What is the story then? How emtpy initializer finish in the AST?
hi Paolo,
Please include an example, it would be very useful to understand the
details of what you're talking about,
-Chris
More information about the cfe-dev
mailing list