<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Oct 21, 2010, at 9:06 AM, Marcin Ĺšwiderski wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div class="gmail_quote"><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">Basically this assumption doesn't match how we treat binary operators in the CFG.  We should probably fix having the LHS always precessed first.  Any objections?</blockquote><div> </div></div>C++ standard states that at the end of full expressions temporary objects created should be destroyed in reverse order of the completion of their construction. So when generating destructors we want to process LHS and RHS subexpressions in reverse order of processing them in VisitBinaryOperator. For logical operators order is defined, and for other operators it is undefined (I would have to check if for assignment operator it is undefined as well...). So for logical operators everything should be left as it is IMO, but for other operators we should probably match the compiler.</span></blockquote></div><br><div>Understood.  The point I was trying to convey was that for non-logical binary operators it is the case that the RHS appears in the CFG before the LHS, which doesn't match the compiler's behavior.  For logical operators, I think everything is working as expected.</div></body></html>