[prev in list] [next in list] [prev in thread] [next in thread]
List: cfe-commits
Subject: Re: [PATCH] D11517: [Sema] Add a note to point to the inaccessible destructor.
From: Davide Italiano <dccitaliano () gmail ! com>
Date: 2015-07-26 22:03:02
Message-ID: CADob98SERAMKY44cLTe5u9O46aRcubWGi8VcpCivGzE9Vr21jA () mail ! gmail ! com
[Download RAW message or body]
Thanks for the review. Are you OK with un-statitcize
DiagnoseAccessPath so that SemaDeclCXX can call it -- or do you prefer
to introduce a wrapper?
On Sun, Jul 26, 2015 at 5:01 PM, Richard Smith <richard@metafoo.co.uk> wrote:
> 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
cfe-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic