<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Aug 26, 2014 at 4:24 PM, 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"><div>Thanks, I prefer this approach.</div>

<div>
<br></div>It seems strange to have the bail-out after we implicitly define special members but before we implicitly instantiate templates. Can the OdrUse check, the use-from-self check, and the ResolveExcpetionSpec call be moved to before we define special members? Does that break something? (I think this should only matter if an implicitly-defined special member is used from itself... which shouldn't matter.)</div>


</blockquote><div><br></div><div>Yes, a bunch of tests (3) fail if I move the two early returns and the ResolveExceptionSpec call above the CXXConstructorDecl if. I landed v2 of the patch in r216562.</div><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">

<div dir="ltr"><div><div><div class="gmail_extra">
<br><div class="gmail_quote">On Tue, Aug 26, 2014 at 2:18 PM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</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">Ok, how does this look?<div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 21, 2014 at 1:28 PM, 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">I'm a bit uncomfortable about duplicating a fragment of MarkFunctionReferenced here. Various other parts of MarkFunctionReferenced logically belong here too, but the problematic cases can't happen only because virtual functions can't be constexpr, nor can they have deduced return types.<div>





<br></div><div>I wonder whether we should instead be passing the OdrUse flag into MarkFunctionReferenced and having it skip the things that don't happen for a reference that's not an odr-use.</div></div><div class="gmail_extra">





<br><br><div class="gmail_quote"><div><div>On Wed, Aug 20, 2014 at 8:08 PM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>></span> wrote:<br></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><div>
<div dir="ltr">Ping :-)</div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Aug 16, 2014 at 10:24 PM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</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">Hi,<div><br></div><div>clang  currently asserts on the following program when building with -std=c++11 (PR19190):</div>






<div><br></div><div><div>  template <class T> struct DWFIterator { virtual T &get() throw(int) = 0; };</div>
<div>  void foo(DWFIterator<int> *foo) { foo->get(); }</div></div><div><br></div><div>This is because in C++11, instantiation of exception specs is deferred. This usually happens in MarkFunctionReferenced(), but that's never called for pure functions. So the exception spec stays unresolved, and codegen then complains about that. (See the bug for details.)</div>







<div><br></div><div>The attached patch lets Sema::MarkAnyDeclReferenced() call ResolveExceptionSpec() for non-OdrUse functions. This fixes the assert and passes all tests, but I'm not sure if it's the best place to do this – hence, pre-commit review, please :-)</div>






<span><font color="#888888">
<div><br></div><div>Nico</div></font></span></div>
</blockquote></div><br></div>
</div></div><br></div></div>_______________________________________________<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></div>
</blockquote></div><br></div></div></div></div>
</blockquote></div><br></div></div>