John, Actually both, subscripts and references. Ok, got will do. Best regards, Alexey Bataev ============= Software Engineer Intel Compiler Team
04.12.2015 12:00, John McCall пишет: > rjmccall added a comment. > > In http://reviews.llvm.org/D15174#302248, @ABataev wrote: > >> 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. > > Just property subscripts and not MS property references in general? > > Fortunately, PseudoOpBuilder is already a dynamic class with > expression-specific subclasses, so hooking these processes is quite easy; you > should be able to just add a virtual method which tells them whether the > result of these compound operations should be the value that's passed to the > setter or the formal result of the setter. Something like this: > > virtual bool useSetterResultAsExprResult() const { return false; } > > If that returns false, they should try to capture the set value as the > result; otherwise, they should try to capture the setter result. > > > http://reviews.llvm.org/D15174 > > > _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits