rjmccall added a comment.

Thanks!


================
Comment at: lib/Sema/SemaPseudoObject.cpp:249
@@ -248,1 +248,3 @@
+    virtual bool useSetterResultAsExprResult(Expr *) const { return false; }
+    virtual bool captureSetValueAsResult() const { return true; }
   };
----------------
I think you just need one of these.  If useSetterResultAsExprResult() returns 
true, buildAssignmentOperation and buildIncDecOperation should try to capture 
the setter result; otherwise, they should try to capture the set value.  And it 
doesn't need to take an Expr* anymore.

Please add a comment explaining that; something like this:

  /// Should the result of an assignment be the formal result of the setter
  /// call or the value that was passed to the setter?
  ///
  /// Different pseudo-object language features use different language rules 
for this.
  /// The default is to use the set value.  Currently, this affects the 
behavior of simple
  /// assignments, compound assignments, and prefix increment and decrement.
  /// Postfix increment and decrement always use the getter result as the 
expression
  /// result.
  ///
  /// If this method returns false, and the set value isn't capturable for some
  /// reason, the result of the expression will be void.


http://reviews.llvm.org/D15174



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

Reply via email to