[cfe-dev] [review request] Removing redundant implicit casts in the AST, take 2

Nicola Gigante nicola.gigante at gmail.com
Sun Dec 25 07:05:03 PST 2011


Hello.

Last month I've submitted a patch to address an issue
with redundant NoOp implicit casts in the AST.
You can find the previous thread here:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20111017/048206.html

The patch I came up with were accepted and committed
but later reverted because of a bug on _Complex casts
found by Richard Smith, which is now fixed.
I've been waiting a little for Richard to tell me more
about another miscompilation that he found in Chrome
but I haven't received anything so far, so I'm asking
again to review my patch.

However, this is not the same patch as before.
In the previous patch, CastExprToType used to create
cast nodes with empty TypeSourceInfo's that had to
be filled later by callers. As Richard suggested,
this wasn't the most robust way to do it.
I've rewritten the patch to pass the relevant information
about TypeSourceInfo's directly down to CastExprToType,
and now the patch should be robust enough.
I also suspect that, since Richard's problems had to do with
null TypeSourceInfo's, this patch resolves his problems
as well.

It passes all the tests, except for two c-index tests that
I don't know how to handle, because I don't
know how to use c-index-test at all.
I suspect they simply mean that the tests have to be
modified for the new structure of the AST, but I don't know
how. Can you point me in the right direction?

Thank you,
Nicola

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ImplicitCastsRemoval-r147266.patch
Type: application/octet-stream
Size: 44359 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20111225/58b43dbe/attachment.obj>


More information about the cfe-dev mailing list