Question: Returning the function declaration by using a cursor in the body of that function

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Question: Returning the function declaration by using a cursor in the body of that function

Robinson, Paul via cfe-dev
Hello,

I'm wondering if there is a function in libclang where the use-case is as below.

Input: A cursor that's inside a function body
Out: The function declaration cursor of the function containing that function body

For example, for a code such as below,

int a() {
   b()
}

I'm wondering if I can use the cursor on "b()" as input to get the function declaration cursor on "int a()".


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev