IHD operator for mutation testing

Hi, i’m the IHD operator (Hidden Variable Delete) for mutation testing using AST matchers:

using namespace std;

class A{
int a;
… …
};

class B: public A{
int a;
… …
};

Mutant:

class A{
int a;
… …
};

class B: public A{
// int a;
… …
};

The problem is that i cannot find a way to find when a field is hidden. I tried with “clang::NamedDecl::isHidden”, but it seems that it doesn’t has nothing to do with this matter. Is there a way to do this with some class method?

Thank you.

I would guess that we don’t have a function for that and it just falls out of name lookup rules, so you might have to implement this yourself (by searching bases, etc). I could be wrong though.

(I’m sort of surprised that mutation testing would use the astmatchers rather than an instrumentation approach like the sanitizers)