[cfe-commits] r145244 - in /cfe/trunk: include/clang/AST/ExprCXX.h include/clang/Sema/Initialization.h include/clang/Sema/Sema.h lib/Sema/Sema.cpp lib/Sema/SemaCast.cpp lib/Sema/SemaExprCXX.cpp lib/Sema/SemaInit.cpp test/Index/preamble_macro_template.cpp test/Index/recursive-cxx-member-calls.cpp

Nicola Gigante nicola.gigante at gmail.com
Thu Dec 1 04:09:24 PST 2011


Il giorno 30/nov/2011, alle ore 00:06, Richard Smith ha scritto:

> On Tue, November 29, 2011 22:28, Richard Smith wrote:
>> This change produces a broken AST for this testcase:
>> 
>> _Complex double d = 0.0;
>> int n = static_cast<int>(d);
>> 
>> Please fix or revert. Thanks!
>> Richard
> 

I'm sorry, this was expected to work of course.
I'll look at it as soon as possible.

> This patch is also causing us to build broken ASTs when compiling Chromium,
> for what appears to be an unrelated reason. I've reverted the patch in
> r145447.
> 

What do you mean by "broken AST" here?

> I'm also concerned that the approach makes it rather easy to accidentally
> introduce this sort of issue. Have you considered passing a pointer to a
> structure containing all the relevant information for building the cast
> expression through the relevant code, rather than just a
> CheckedConversionKind?
> 

I admit that this isn't the most robust design in the world. However,
I've tried to do what you suggest, and I got some problems.

After looking at the crash I'll see if I can improve this detail.

> Thanks,
> Richard

Bye,
Nicola



More information about the cfe-commits mailing list