<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Sep 12, 2016 at 10:55 AM, David Blaikie via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</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">Does that actually need a virtual dtor? The type erasure handling in shared_ptr would handle it so long as each instance is constructed with the derived type (looks like it probably is - make_shared used consistently) & we should get a warning (or could make the base dtor protected non-virtual to ensure an error) if we miss that?<br></div></blockquote><div><br></div><div>We get warnings from GCC regardless, and that broke a few bots :( I'd like to switch this back to unique_ptr at some point (once I've figured out why MSVC rejected it) and at that point we'll need the virtual destructor.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">But I can understand that it's perhaps nice to do even if we could thread that delicate needle. Just curious.</div><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote"><div dir="ltr">On Sun, Sep 11, 2016 at 11:59 PM Richard Smith via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rsmith<br>
Date: Mon Sep 12 01:51:11 2016<br>
New Revision: 281198<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=281198&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=281198&view=rev</a><br>
Log:<br>
Add virtual destructor (necessary due to the switch to shared_ptr).<br>
<br>
Modified:<br>
    cfe/trunk/utils/TableGen/<wbr>ClangDiagnosticsEmitter.cpp<br>
<br>
Modified: cfe/trunk/utils/TableGen/<wbr>ClangDiagnosticsEmitter.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/ClangDiagnosticsEmitter.cpp?rev=281198&r1=281197&r2=281198&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/utils/<wbr>TableGen/<wbr>ClangDiagnosticsEmitter.cpp?<wbr>rev=281198&r1=281197&r2=<wbr>281198&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/utils/TableGen/<wbr>ClangDiagnosticsEmitter.cpp (original)<br>
+++ cfe/trunk/utils/TableGen/<wbr>ClangDiagnosticsEmitter.cpp Mon Sep 12 01:51:11 2016<br>
@@ -911,6 +911,7 @@ namespace {<br>
 struct DiagText {<br>
   struct Piece {<br>
     virtual void print(std::vector<std::string> &RST) = 0;<br>
+    virtual ~Piece() {}<br>
   };<br>
   struct TextPiece : Piece {<br>
     StringRef Role;<br>
<br>
<br>
______________________________<wbr>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
</blockquote></div>
</div></div><br>______________________________<wbr>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div></div>