Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] what should IASTNode exactly be in ICPPClassSpecialization#getFields(IASTNode)?

Hi all,


I am trying to get specialized class fields and I need to pass an IASTNode object in order to call this method: ICPPClassSpecialization#getFields(IASTNode). I believe this IASTNode is there to let cdt know what class specialization I am going to generate fields for. But I am not sure what exactly that node should be. Let’s say I have the following class structure:


template <typename T>

struct Bla {

  T a;


template <typename T>

struct Foo {

    Bla<T> bla;



int main(int argc, char*argv[]) {

   Foo<int> x;



Now, for the binding resolved from name “x”, I want to get its fields, what would be the IASTNode I pass?

Let’s say I successfully got specialized fields for “x”.  Then I want to look inside field x.bla which also is instance of ICPPClassSpecialization, and I want to call getFields on it as well to get the specialized field “int a”, what IASTNode do I pass in this case? “Bla<T> bla” _expression_ seems to not have the specialization anymore for T.


Thanks for your time,



Back to the top