[cfe-dev] determining header inclusion path

Naoya Maruyama naoya.maruyama at gmail.com
Thu Jul 1 01:18:43 PDT 2010


Hi,

I'm trying to find how each C declaration is included from the
originating source file. Specifically, say, I have a Decl object, and
I want to know where this Decl is declared. And if it's in a header
file, I want to know the inclusion path from the originating source
file. For example, if main.c includes foo.h, and foo.h includes bar.h,
I want to know the inclusion path of each declaration in bar.h to be
something like "main.c->foo.h->bar.h". Would anybody please tell me
how to find this information from Decl objects in clang?

Regards,

Naoya



More information about the cfe-dev mailing list