<div dir="ltr">ping</div><div class="gmail_extra"><br><div class="gmail_quote">On 23 February 2015 at 03:08, Michael Park <span dir="ltr"><<a href="mailto:mcypark@gmail.com" target="_blank">mcypark@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Richard,<div><br></div><div>I forgot about this for long time but I had a chance this weekend to revisit it.</div><div><br></div><div>I've added the part to<span style="font-size:12.8000001907349px"> save and restore the pending local instantiations around the calls to instantiate the class body and its members. But </span><span style="font-size:12.8000001907349px">I'm uncertain whether we need/want the vtable related code here since</span> I don't think we actually have a way to use the vtable in this context. It also seems that we don't need an instance of <b>LocalInstantiationScope</b> here since we don't have any template parameters to store at this level.</div><div><br></div><div>Sorry for the delay in the follow-up, once I get feedback from you the subsequent ones will be much quicker.</div><div><br></div><div>Thanks,</div><div><br></div><div>MPark.</div><div><br></div><div><br></div><div><span style="font-size:12.8000001907349px"><br></span></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 29 September 2014 at 11:05, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Tue, Sep 23, 2014 at 2:33 PM, Michael Park <span dir="ltr"><<a href="mailto:mcypark@gmail.com" target="_blank">mcypark@gmail.com</a>></span> wrote:<br><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 dir="ltr">I tried adding <b>LocalInstantiationScope</b> around <b>PerformPendingInstantiation</b>, like so:<div><br><div><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">// A static constexpr member function of a local class can be used in<br>// a constexpr expression right after the local class' definition.<br>// We need to instantiate them now, otherwise it may be too late.<br>LocalInstantiationScope Local(SemaRef);<br>SemaRef.PerformPendingInstantiations(/*LocalOnly=*/true);<br>Local.Exit();</blockquote><div><br></div>but it didn't seem to work. I'm not sure what I'm missing here. Could you give me a hint please?</div></div></div></blockquote><div><br></div></span><div>This is the bit I was referring to:</div><div><br></div><div><div>  SavePendingLocalImplicitInstantiationsRAII</div><div>      SavedPendingLocalImplicitInstantiations(*this);</div><div>  std::unique_ptr<SavePendingInstantiationsAndVTableUsesRAII></div><div>      SavePendingInstantiationsAndVTableUses;</div><div>  if (Recursive) {</div><div>    SavePendingInstantiationsAndVTableUses.reset(</div><div>        new SavePendingInstantiationsAndVTableUsesRAII(*this));</div><div>  }</div></div><div><br></div><div>[...]</div><div><br></div><div><div>  PerformPendingInstantiations(/*LocalOnly=*/true);</div><div>  Scope.Exit();</div><div><br></div><div>  if (Recursive) {</div><div>    // Define any pending vtables.</div><div>    DefineUsedVTables();</div><div><br></div><div>    // Instantiate any pending implicit instantiations found during the</div><div>    // instantiation of this template.</div><div>    PerformPendingInstantiations();</div><div><br></div><div>    // Restore PendingInstantiations and VTableUses.</div><div>    SavePendingInstantiationsAndVTableUses.reset();</div><div>  }</div></div><span><div><br></div><div> </div><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 dir="ltr"><div><div>Thanks </div></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On 25 August 2014 01:30, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br><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 dir="ltr">It would be better to save and restore the pending local instantiations around the calls to instantiate the class body and its members, as we do elsewhere when we perform local pending instantiations.</div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Fri, Aug 22, 2014 at 2:41 AM, Michael Park <span dir="ltr"><<a href="mailto:mcypark@gmail.com" target="_blank">mcypark@gmail.com</a>></span> wrote:<br><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 dir="ltr">Fixes <a href="http://llvm.org/bugs/show_bug.cgi?id=20625" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=20625</a></div>
<br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></blockquote></span></div><br></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>