<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Dec 21, 2012, at 10:30 AM, Ben Gertzfield <<a href="mailto:bgertzfield@gmail.com">bgertzfield@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">On Fri, Dec 21, 2012 at 10:12 AM, Douglas Gregor <span dir="ltr"><<a href="mailto:dgregor@apple.com" target="_blank">dgregor@apple.com</a>></span> wrote:<br><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div class="h5">clang_findReferencesInFile.</div></div></blockquote><div><br>
</div><div style="">Got it. I found functions like this to be very handy in my Python unit tests as well.</div></div></div></div></div></blockquote><div><br></div><div>I should probably have said more, because clang_findReferencesInFile is a good example of something that can be implemented with the CXCursor interface, but it's surprisingly hard to get right, and users that tried ended up with poor versions of the feature. But clang_findReferencesInFile gets the details right, and will be updated as the underlying C++ ASTs change, so users of that interface get more accurate results with less work. Oh, and it performs way better, too, because it can use the richer C++ ASTs to optimize its traversal.</div><div><br></div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div style="">Perhaps optionally building on a comment cursor API foundation, we could provide stable high-level APIs like this to find all the comments in a file, or all the comment nodes of a particular type in a comment, etc.</div>
</div></div></div></div></blockquote><br></div><div>We could. The question is whether there are clients that would really benefit from this work, or whether we'd be better off making the high-level API that much better.</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">      </span>- Doug</div><br></body></html>