John, the result is always the result of Put operation. For pre-increment we have to return new value, for the post-increment - previous value returned by Get (checked it on MSVC). So, currently postincrement works correctly, pre-increment and assignment not. For pre-increment and assignment we have to capture the result of Put operation as a result. It means, that in your solution we need to modify
buildAssignmentOperation() and buildIncDecOperation() and the worst thing is that these functions must be changed only for MSPropertySubscriptExpr. Best regards, Alexey Bataev ============= Software Engineer Intel Compiler Team 03.12.2015 20:18, John McCall пишет: > rjmccall added a comment. > > Hmm. I think a better approach would be for buildAssignmentOperation to do > this; but before we figure out how to do that, we should make sure of the > language semantics we're implementing. Are the semantics that the result of > an assignment is always the result of the Put operation, or, if that's void, > should the result be the assigned value? And what should happen with > pre-increment and post-increment? > > > http://reviews.llvm.org/D15174 > > > _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits