<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW " title="NEW --- - point to the destructor that's private or inaccessible" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D24260&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=dIwjUGxXiyAyy3mfFVeQ5RlbOtUKC_5_6EbHRrM00Ns&s=FxKA2l8U8_vP_1qbbDZ1iSL-VdiobGqw7XtKzPSkLUQ&e=">24260</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>point to the destructor that's private or inaccessible
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>nlewycky@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Missing note at declaration of private or inaccessible destructor that causes
another type to have no destructor.

$ cat b17589480.cc 
class X {
  ~X();  // private
};
struct Y {
  X x;
};
void test() {
  Y y;
}
$ clang -std=c++14 b17589480.cc 
b17589480.cc:8:5: error: call to implicitly-deleted default constructor of 'Y'
  Y y;
    ^
b17589480.cc:5:5: note: default constructor of 'Y' is implicitly deleted
because
      field 'x' has an inaccessible destructor
  X x;
    ^
1 error generated.

Please add a note pointing to ~X() itself. This will especially help for the
case where Y's member isn't just an X but is template typename T.</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>