Clang libtoolig

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,

You could also find many sample usages of libTooling in clang-tools-extra.

Hope this helps :slight_smile: