I’m novice with libtooling, I try to learn with easy c++ code. I try to parse/print typedef expression like below lines:
namespace DEBUG {
typedef void(*function_pointer_t)(int&);
typedef int myInt;
}
clang++ -Xclang -ast-dump -fsyntax-only
output:
Did you register the matcher (i.e. “typedefDeclMatch”) beforehand? For example, https://github.com/llvm-mirror/clang-tools-extra/blob/master/include-fixer/find-all-symbols/FindAllSymbols.cpp#L117
You could also find many sample usages of libTooling in clang-tools-extra.
Hope this helps 
Cheers,
Eric