|Re: [cdt-dev] How to get definition of a declaration that is in a header file.|
CDT does not keep ASTs for files in the index. It creates an AST for a file during indexing, saves information from the AST into the index, and then discards the AST.> I generally use Binding.getDefn() if the type of binding is CPPCLasstype
> But, if the definition is outside, then what I get
> is org.eclipse.cdt.internal.core.pdom.dom.cpp.PDOMCPPClassType and this
> has no getDefn().
> Basically , its a struct definition node and I want to get it
Therefore, you have two options:
1) Get the information you want from the index.
2) Re-parse the header file to get an AST for it.
Depending on what it is exactly you want to do, one or the other may be more appropriate.
cdt-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
Back to the top