I am parsing c++ codes using Libclang. I want to check for every function/method if it is asynchronous. For example:
void returnN(std::function<void(int)> handler){
auto t = std::thread([handler](){
handler(10);
});
t.join();
}
The above function is asynchronous since it is non-blocking. How can I detect the same using Libclang parsing in python?
I am parsing the entire code in a depth first search, and whenever I come across a FUNCTION_DECL cursor, I want to be able to print if it is asynchronous.