<br>Say I have a class, with a member declaration:<br><br>class A { void foo() {} };<br><br>and I get a cursor to it.  I then find a reference to it, say:<br><br>int main() { A a; a.foo(); }<br><br>The return value of clang_getCursorReferenced() is then "equal" to the declaration cursor.  By looking at source, it appears that "equal" here means that they're of the same kind, and the fields data[3] are all equal.<br>
<br>Things change when A is a class template, however:<br><br>template <class T><br>class A { void foo() {} };<br><br>Say I have a couple references to this method, now, say:<br><br>int main() { A<int> a; a.foo(); A<double> b; b.foo(); }<br>
<br>Now the return values of clang_getCursorReferenced() are no longer "equal" to the declaration cursor.  They appears to be different via the value of CXCursor::data[0], which seems to change for each instantiation of the template.<br>
<br>Is there a way to connect the reference cursors back to the member declaration cursor?  Moreover, is there a way to do it through the python bindings?<br><br>My goal is to find all uses of A<T>::foo(), regardless of T.<br>
<br>Thanks for any help.<br><br>Bob Anderson<br><br>