[cfe-dev] Cleanup/Bugfixing in SemaInit.cpp

Steve Naroff snaroff at apple.com
Mon May 19 10:36:48 PDT 2008


On May 18, 2008, at 3:55 PM, Eli Friedman wrote:

> Per desccription, patch attached.  Mostly small changes: a few trivial
> bugfixes, and some refactoring.  This patch fixes all the test
> failures except for one minor warning change.
>

Excellent.

> The one non-obvious change is the change to CheckImplicitInitList,
> doing the typechecking before constructing the implicit init list.  As
> I state in a comment, the reason is that we can't know how many
> elements we need to add to the implicit init list until we've
> typechecked the children.  I think this is the most reasonable way for
> the code to work correctly in its current form.
>

Agreed. I had a feeling we'd need to separate type checking from  
implicit init list construction.

> I won't commit any patches to SemaInit.cpp without snaroff's approval,
> since I don't want to step on his toes.  I can also split up the
> patch, if that would make it easier to review.
>

No worries. Since you/I worked on CheckInitializerListTypes, it's  
really good to have you review/enhance CheckInitList. I find this part  
of the C language very tricky. fyi...I'm in the process of moving my  
family and Apple's World Wide Developers conference is coming up soon  
(as a result, CheckInitList hasn't received my attention for a couple  
weeks now).

I noticed this patch doesn't enable any of these changes yet (i.e. you  
didn't change Sema::CheckInitializerTypes()). Was this intentional?

I haven't reviewed the patch closely, however I think it moves the  
ball forward. Please commit (and we can iterate if necessary...).

Thanks again - I greatly appreciate the work you are doing!

snaroff

> -Eli
> <ttt.txt>_______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list