FieldDecl isReferenced() within a certain class?

Hi again,

I couldn’t find a solution for this problem, but I was wondering if I could traverse a subset of classes looking for a “memberExpr” which is referencing a certain “fieldDecl”.

Maybe I could use:
http://clang.llvm.org/doxygen/classclang_1_1RecursiveASTVisitor.html#ac74e5ed6ab3568f7ba8819507e768050
but, how can I indicate that the traveral is only in a class or some classes?

BTW, what should I use instead of “Context.getTranslationUnitDecl()” as argument of “TraverseStmt(Stmt *S)”?

This task is really necessary for me.

Thanks,

Pedro.

El día 26 mar 2014 19:29, Pedro Delgado Perez pedro.delgadoperez@mail.uca.es escribió: