On Wed, Oct 5, 2011 at 12:13 AM, Anton Korobeynikov <[email protected]> wrote: > Hello Eli, > >> This looks suspicious: specifically, it destroys the invariant in C++ >> that preinc/dec return an lvalue. Also, it doesn't appear to handle >> ++x and x+=1 equivalently. > How it can be modelled then? Here we have unary expression applied > directly to decl reference.
The cast does need to get there somehow in C mode (in C++, we should get an appropriate AST without that change). However you do it, it does need to cover the x+=1 case, though. If you follow John's advice and do the promotion in UsualUnaryConversions, it should pick up this case without extra code. -Eli _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
