<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Sep 15, 2009, at 3:11 AM, Argyris Kyrtzidis wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Daniel,</div><br><div><div>On Sep 14, 2009, at 11:48 PM, dan chap wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><table cellspacing="0" cellpadding="0" border="0" style="position: static; z-index: auto; "><tbody><tr><td valign="top" style="font: inherit;">Hello, <br><br>I have a question about the indexer library and the index-test code....<br><br>Given code such as:<br><br><br><span style="font-family: courier,monaco,monospace,sans-serif;">typedef int myType;</span><br style="font-family: courier,monaco,monospace,sans-serif;"><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;">myType var1;</span><br style="font-family: courier,monaco,monospace,sans-serif;"><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;">myType func1(myType *parm1)</span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;">{</span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family:
 courier,monaco,monospace,sans-serif;">   return *parm1 / var1;</span><br style="font-family: courier,monaco,monospace,sans-serif;"><span style="font-family: courier,monaco,monospace,sans-serif;">}</span><br style="font-family: courier,monaco,monospace,sans-serif;"><br><br>The indexer utility will correctly show references to parm1 within func1.<br><br>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...<br><br>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.<br><br>Is this functionality already in the indexer library and I am extremely dense? :)<br><br></td></tr></tbody></table></blockquote><div><br></div><div>This functionality is not yet in the indexer library; it's on my todo list but no ETA tough :)</div><div><br></div></div><br></div></blockquote><br></div><div>Type references in declarations are now tracked by the Indexer library.</div><div>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.</div><div><br></div><div>I'd appreciate any feedback that you may have!</div><div><br></div><div>-Argiris</div><br></body></html>