<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Dec 18, 2013 at 7:09 PM, Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.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">I also don't like having to emit LLVM IR for this program:<div><br><div><div>class A { ~A() {} };</div><div>struct B : A { };</div><div>void foo(B b) { }</div></div><div><br></div></div><div>Any call to foo would be an error, but if we just turn off the access check, we'll generate code for B's deleted dtor, which is really, really weird.</div>
</div></blockquote><div><br></div><div>We're still calling DiagnoseUseOfDecl, so we'll still reject this (in C++11, where the dtor is deleted).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><div class="gmail_extra"><div class="gmail_quote">On Wed, Dec 18, 2013 at 6:38 PM, David Majnemer <span dir="ltr"><<a href="mailto:david.majnemer@gmail.com" target="_blank">david.majnemer@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I don't think we should elide these checks.  This would lead us to behave differently than MSVC inside of SFINAE contexts.<div>

<br></div><div>Sent from my phone.<div><div><span></span><br><br>On Wednesday, December 18, 2013, Hans Wennborg  wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><br>
  The problem is that MarkFunctionReferenced does access checks as it marks functions as referenced. This makes perfect sense, except here when we want to be able to call the dtor but bypass the access check.<br>
<br>
  Richard: it would be interesting to hear your thoughts on this. Is the added plumbing of this boolean variable through the various functions an acceptable approach? Would it be ok to avoid that with some mechanism to "trap" access check errors (maybe a flag on Sema)? Or is it not worth the hassle to change this?<br>



<br>
<a href="http://llvm-reviews.chandlerc.com/D2409" target="_blank">http://llvm-reviews.chandlerc.com/D2409</a><br></div></div>
_______________________________________________<br>
cfe-commits mailing list<br>
<a>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>
</blockquote></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div></div>