<div><div class="gmail_extra"><div class="gmail_quote">On 21 Sep 2016 6:10 am, "Aaron Ballman" <<a href="mailto:aaron.ballman@gmail.com">aaron.ballman@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">aaron.ballman added a comment.<br>
<br>
The other thing this patch is missing are tests, btw.<br>
<div class="quoted-text"><br>
<br>
================<br>
Comment at: lib/AST/Expr.cpp:2869<br>
@@ +2868,3 @@<br>
</div><div class="quoted-text">+    // assignment operator is intended to have a side-effect and other overloaded<br>
+    // operators are not. Otherwise fall through the logic of call expression.<br>
+    OverloadedOperatorKind Op = cast<CXXOperatorCallExpr>(<wbr>this)->getOperator();<br>
</div>----------------<br>
I think that `operator++()` and `operator--()` should be handled as well as the assignment operators. @rsmith, thoughts?<br></blockquote></div></div></div><div><br></div><div>I agree; if we're going to assume that overloaded operators are intended to mutate the object in the cases where the builtin form does, that should apply to all such operators -- assignment, compound assignment, increment and decrement.</div><div><br></div><div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<a href="https://reviews.llvm.org/D22910" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D22910</a><br>
<br>
<br>
<br>
</blockquote></div><br></div></div>