How to get a list of all global declarations of a C/C++ program using Clang?
问题 I'm trying to write a program that lists all of the publicly exported variables and functions of a C or C++ program by using Clang. I followed part 05 of this tutorial, but it doesn't work for current version of clang. Above that, I got some hints that CompilerInstance can make the code shorter, but I'm not entirely sure how to use it. How would you implement this functionality? Can you give me any pointers into the right direction? For example: is there a large hash table of globally