[cfe-dev] Indexer Library and type references....

Argyris Kyrtzidis akyrtzi at gmail.com
Tue Sep 29 17:07:17 PDT 2009


On Sep 15, 2009, at 3:11 AM, Argyris Kyrtzidis wrote:

> Hi Daniel,
>
> On Sep 14, 2009, at 11:48 PM, dan chap wrote:
>
>> Hello,
>>
>> I have a question about the indexer library and the index-test  
>> code....
>>
>> Given code such as:
>>
>>
>> typedef int myType;
>>
>> myType var1;
>>
>> myType func1(myType *parm1)
>> {
>>    return *parm1 / var1;
>> }
>>
>>
>> The indexer utility will correctly show references to parm1 within  
>> func1.
>>
>> What I am interested in is providing the source location for  
>> "myType" on the initial typedef statement and then extracting all  
>> the references to myType such as var1,  the function return type  
>> and parm1 type, as well as cast expression references...
>>
>> At present I can do most of this by simply refering to the type  
>> assigned to the declaration but I am effectively building my own  
>> index rather than simply "findreferences" from the indexer library.
>>
>> Is this functionality already in the indexer library and I am  
>> extremely dense? :)
>>
>
> This functionality is not yet in the indexer library; it's on my  
> todo list but no ETA tough :)
>
>

Type references in declarations are now tracked by the Indexer library.
Note, though, that type references in expressions are not tracked  
because type source information for exprs (like sizeof/alignof) is not  
preserved in the AST yet.

I'd appreciate any feedback that you may have!

-Argiris

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


More information about the cfe-dev mailing list