Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] How to get the IASTName from an IIndexName ?

On Fri, May 22, 2009 at 12:18 AM, manivannan_pk <manivannanp_k@xxxxxxxxxxx> wrote:

> IASTName makes sense only in a context of IASTTranslationUnit.
> IASTTranslationUnit.getDefinitions(IBinding)
> IASTTranslationUnit.getDeclarations(IBinding) (declarations also include
> definitions)
> IASTTranslationUnit.getReferences(IBinding)
> return IASTNames for the names in the AST and IIndexName for the names
> outside.

Thanks for the reply. So when you say "names outside (the present
IASTTranslationUnit on which the get...() query is invoked)" isn't there an
IASTName in some other IASTTranslationUnit corresponding to every IIndexName
that is returned by the get...() methods ? If so, how does one get access to
that IASTName from the IIndexName ? This is what I tried to mean in my
original question. But I did not explain it correctly. Please clarify.

The only way to get those IASTNames would be to open the corresponding files and parse them to get ASTs. This is pretty expensive and in most cases unnecessary. 


View this message in context:
Sent from the Eclipse CDT - Development mailing list archive at

cdt-dev mailing list

Back to the top