Find all references of specific function declaration in libclang (Python)
问题 I am trying to find (line and column position) all the references of a specific function declaration when parsing a C++ source file via libclang in Python. For example: #include <iostream> using namespace std; int addition (int a, int b) { int r; r=a+b; return r; } int main () { int z, q; z = addition (5,3); q = addition (5,5); cout << "The first result is " << z; cout << "The second result is " << q; } So, for the source file above, I would like for the function declaration for addition in