<div dir="ltr">On Tue, Jun 4, 2013 at 2:51 PM, Pan, Wei <span dir="ltr"><<a href="mailto:wei.pan@intel.com" target="_blank">wei.pan@intel.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">






<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">For the following example, the argument in the call “foo(x)” does not have an implicit cast on top of  the CXXConstructExpr. Is it generally right to generate
 one for this call? If yes, then CastExpr::getSubExprAsWritten would work here. <u></u>
<u></u></span></p>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">void foo(Y y);<u></u><u></u></span></p>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">void bar(X x) {<u></u><u></u></span></p>
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">   foo(x);<br>
}<u></u><u></u></span></p>
<p class=""><br></p></div></div></blockquote><div><br></div><div>There are three CXXConstructExprs here: one is the ConstructorConversion, and the other two are copy constructors.  Off the top of my head, I'm not sure there's a convenient way to check whether a CXXConstructExpr is an implicit copy constructor call.</div>
</div><br></div><div class="gmail_extra">-Eli</div></div>