Access specifiers of NamedDecl

Hi,

I'm writing here because I have a problem with clang tooling :slight_smile:

I'm developing a tool for my company which uses clang to parse a C++ header,
and get some information about it. I would like to find out if a NamedDecl is
accessible in a given scope.

e.g. given the following source code, i would like to know the accessibility
from f() of the class returned by each public method in A
(A::B, A::C<int> and A::D)

```
class A {
private:
   class B { public: class B2 {}; };
   template<typename T>
   class C {};

public:
   class D {};

// --- some getters
   B getB();
   B::B2 getB2();
   C<int> getC();
   D getD();
};

void f() {
   // queries from here
   // e.g: