Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] How to get references of struct fields separately

Hi,
I am not sure whether I am asking my question in the right place, but i tried the forum and they led me here, so I will give it a try. :)

I am trying to do some analysis of C code therefore I am using CDT to do so. But unfortunately I am stuck right now, because I need to get references of every field of structs.
What i basically do is:
I am building an AST and use a visitor to get all variables (precisely declarations) and then search the index for references of every variable. That works fine but for structs i need to get not only every references for the whole struct, but for every single field of it seperately.

Anyone any suggestions how to do that?

Thanks in advance,
Toni


Back to the top