rsmith added inline comments.
================
Comment at: lib/Sema/SemaDeclCXX.cpp:5575-5581
@@ +5574,9 @@
+ // Explain the reasons of inaccessibility.
+ if (Field) {
+ if (CXXRecordDecl *C = Field->getType()->getAsCXXRecordDecl()) {
+ CXXDestructorDecl *D = S.LookupDestructor(C);
+ if (D && !D->isImplicit())
+ S.Diag(D->getLocStart(), diag::note_destructor_here);
+ }
+ }
+ }
----------------
This doesn't seem right: you're producing a note for a destructor no matter
which special member function was found to be inaccessible. The best thing to
do would be to ask the SemaAccess code to produce the relevant note (see
DiagnoseAccessPath); that way you can produce a note that says "declared
private here" or whatever else is relevant (which can sometimes be that a
virtual base destructor is inaccessible due to a private access path, for
instance).
Repository:
rL LLVM
http://reviews.llvm.org/D11517
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits