[cfe-dev] FieldDecl isReferenced() within a certain class?

Pedro Delgado Perez pedro.delgadoperez at mail.uca.es
Wed Mar 26 11:29:29 PDT 2014


 
Hi everyone,

Maybe my question has a simple answer, but after a time searching for the solution, I haven't found how could I know if a fieldDecl has been referenced in a certain class.

An example:

class A{
  public:
       int a;
       int method(){ return a;}
 ...
};

class B: public A{
...
};

In the above example, if I use the method "isReferenced()" regarding the member variable "a", I think I will get "true" because it was returned in "method". However, if I want to know if that member was referenced within the class "B" (or a subset of classes), how could I do that? (not only in inline methods, but also in redeclarations)

Thanks in advance,

Pedro.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140326/d92471fa/attachment.html>


More information about the cfe-dev mailing list