[PATCH] D11517: [Sema] Add a note to point to the inaccessible destructor.

Davide Italiano dccitaliano at gmail.com
Sun Jul 26 13:30:48 PDT 2015


davide created this revision.
davide added reviewers: nlewycky, rsmith.
davide added a subscriber: cfe-commits.
davide set the repository for this revision to rL LLVM.

This is an attempt to fix a FIXME from a previous commits, and now the testcase in PR24260 emits the following diagnostics:

std.cpp:8:5: error: call to implicitly-deleted default constructor of 'Y'
  Y y;
    ^
std.cpp:5:5: note: default constructor of 'Y' is implicitly deleted because field
      'x' has an inaccessible destructor
  X x;
    ^
std.cpp:2:3: note: destructor is declared here
  ~X();  // private
  ^
1 error generated.

I didn't put the name of the class in the note, because it seems pretty obvious from SourceLoc. I can change that, if needed.

Repository:
  rL LLVM

http://reviews.llvm.org/D11517

Files:
  include/clang/Basic/DiagnosticSemaKinds.td
  lib/Sema/SemaDeclCXX.cpp
  test/CXX/special/class.copy/implicit-move.cpp
  test/CXX/special/class.copy/p11.0x.copy.cpp
  test/CXX/special/class.copy/p11.0x.move.cpp
  test/CXX/special/class.ctor/p5-0x.cpp
  test/CXX/special/class.dtor/p5-0x.cpp
  test/SemaCXX/defaulted-private-dtor.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11517.30666.patch
Type: text/x-patch
Size: 4508 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150726/777a8510/attachment.bin>


More information about the cfe-commits mailing list