diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-05-28 04:34:55 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-05-28 04:34:55 +0000 |
commit | 76ef658c703faf72c00f324fb9edc03169718e3e (patch) | |
tree | 7ec1f9a2fc34f284c7e4527aa4a975abef6df9b4 /lib/Sema/SemaAccess.cpp | |
parent | c302f002f5e88a7ce29026bf9b006ff6774892b5 (diff) |
When we complain about a member being inaccessible due to a constraint
along an access path, add another note pointing at the member we
actually found.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104937 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaAccess.cpp')
-rw-r--r-- | lib/Sema/SemaAccess.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaAccess.cpp b/lib/Sema/SemaAccess.cpp index 444ee79858..54d06f531c 100644 --- a/lib/Sema/SemaAccess.cpp +++ b/lib/Sema/SemaAccess.cpp @@ -870,6 +870,10 @@ static void DiagnoseAccessPath(Sema &S, << BS->getSourceRange() << (BaseAccess == AS_protected) << (BS->getAccessSpecifierAsWritten() == AS_none); + + if (D) + S.Diag(D->getLocation(), diag::note_field_decl); + return; } } |