[cfe-dev] Implement type merging in ASTContext

Chris Lattner clattner at apple.com
Thu Aug 21 15:44:00 PDT 2008

On Aug 19, 2008, at 7:27 PM, Eli Friedman wrote:

> Patch per subject, adds a method to query for the merged type for two
> types.  This is necessary in a few places per the C standard, like
> redeclarations and conditionals, although the effect is usually pretty
> subtle.


> I think this patch is pretty close to correct; the one thing I'm
> really wondering about is ObjC types.  I don't know what the rules for
> compatibility for ObjC types are supposed to be, so the current patch
> is mostly just guessing.  The version attached doesn't cause any
> regressions in the testsuite, so I think this gets the basics correct,
> but I might be missing some cases.  If anyone actually knows the
> complete rules, I'd appreciate a patch review or a pointer to the
> rules.

It looks pretty reasonable to me, but I didn't scrutinize the logic.   
If you think it is a step forward in the current codebase (towards  
correctness) plz feel free to commit it, even if not perfect.


More information about the cfe-dev mailing list