<div>W dniu 17 listopada 2010 09:17 użytkownik Zhongxing Xu <span dir="ltr"><<a href="mailto:xuzhongxing@gmail.com">xuzhongxing@gmail.com</a>></span> napisał:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Index: lib/Checker/GRExprEngine.cpp<br>===================================================================<br>--- lib/Checker/GRExprEngine.cpp    (revision 119383)<br>+++ lib/Checker/GRExprEngine.cpp    (working copy)<br>
@@ -2061,9 +2061,11 @@<br>
   if (const PointerType *FnTypePtr = FnType->getAs<PointerType>())<br>     Proto = FnTypePtr->getPointeeType()->getAs<FunctionProtoType>();<br> <br>-  // Evaluate the arguments.<br>+  // Evaluate the arguments. For a method call treat the first argument<br>

+  // as a lvalue.<br>   ExplodedNodeSet ArgsEvaluated;<br>-  EvalArguments(CE->arg_begin(), CE->arg_end(), Proto, Pred, ArgsEvaluated);<br>+  EvalArguments(CE->arg_begin(), CE->arg_end(), Proto, Pred, ArgsEvaluated,<br>

+      dyn_cast_or_null<CXXMethodDecl>(CE->getCalleeDecl()));<br><br>This part is not necessary, since CXXOperatorCallExpr would be visited in its own method.<br><br>Other parts of the patch are good to apply.<div>
<div></div><div class="h5"><br></div></div></blockquote><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">'kay, thanks. I'll do that and separate method for CXXOperatorCallExpr  in the evening (my time).</span></div>
<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "></span> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div class="h5">
<br><div class="gmail_quote">2010/11/17 Marcin Świderski <span dir="ltr"><<a href="mailto:marcin.sfider@gmail.com" target="_blank">marcin.sfider@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">

<div class="gmail_quote">W dniu 17 listopada 2010 04:33 użytkownik Zhongxing Xu <span dir="ltr"><<a href="mailto:xuzhongxing@gmail.com" target="_blank">xuzhongxing@gmail.com</a>></span> napisał:<div><div></div><div>

<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
I guess we shouldn't handle CXXOperatorCallExpr in VisitCall(). It should has it own code path, like CXXMemberCallExpr.<br><br><div class="gmail_quote"><div>2010/11/17 Marcin Świderski <span dir="ltr"><<a href="mailto:marcin.sfider@gmail.com" target="_blank">marcin.sfider@gmail.com</a>></span><br>



</div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">Patch: For an operator call that really is a method call treat the first argument as a lvalue.<div>


<div>
<br></div><div>Please approve for commit.</div><div><br></div><font color="#888888"><div>- Marcin</div>
</font></div></blockquote></div><br>
</blockquote></div></div></div>Yes, I forgot to mention that it's for CXXOperatorCallExpr, will add this in comment. It probably should have its own code path, but the new FstArgAsLValue argument of EvalArguments will be usable for it, so this change can be treated as the first step in proper handling of CXXOperatorCallExpr.
</blockquote></div><br>
</div></div></blockquote></div><br>