[cfe-dev] clang::CompoundLiteral::getInitializer() should use cast_or_null() (or I am missing something)
bolzoni at cs.unipr.it
Tue Dec 16 15:21:15 CST 2008
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?
More information about the cfe-dev