<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:richard-llvm@metafoo.co.uk" title="Richard Smith <richard-llvm@metafoo.co.uk>"> <span class="fn">Richard Smith</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Using override on a overridden destructor produces an error"
   href="https://llvm.org/bugs/show_bug.cgi?id=30844">bug 30844</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>richard-llvm@metafoo.co.uk
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Using override on a overridden destructor produces an error"
   href="https://llvm.org/bugs/show_bug.cgi?id=30844#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Using override on a overridden destructor produces an error"
   href="https://llvm.org/bugs/show_bug.cgi?id=30844">bug 30844</a>
              from <span class="vcard"><a class="email" href="mailto:richard-llvm@metafoo.co.uk" title="Richard Smith <richard-llvm@metafoo.co.uk>"> <span class="fn">Richard Smith</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=30844#c1">comment #1</a>)
<span class="quote">> Not sure why GCC accepts it... GCC certainly thinks its deleted.</span >

Based on how it diagnoses problems, I think GCC doesn't have any way to check
whether a special member should be deleted other than trying to define it. As a
result, I'd guess that its representation of the function doesn't mark it as
deleted, which is probably how its check for "deleted function overrides
non-deleted function" misses this case.

Anyway, I improved the diagnostic in r285610, and we now report:

<stdin>:8:5: error: deleted function '~Derived' cannot override a non-deleted
function
    ~Derived() override = default;
    ^
<stdin>:3:13: note: overridden virtual function is here
    virtual ~Base() = default;
            ^
<stdin>:6:17: note: destructor of 'Derived' is implicitly deleted because base
class 'Base' has an inaccessible destructor
class Derived : public Base
                ^

... which should hopefully prevent anyone else from being confused as to why we
would reject this.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>