hintonda added a comment.

Current diff is incorrect, but I did find the problem.

When iterating over the fields of a record, we use an iterator.  The problem is 
that if we use a designator, we reset the iterator value, so we can no longer 
check Field != FieldEnd if the designators are out of order.

So, if we want to allow designators to be out of order, we'll need to keep 
track of what was actually initialized, not just that we initialized the 
correct number.  (see SemaInit.cpp:1825)

I'll work up a fix.


http://reviews.llvm.org/D17407



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to