[cfe-dev] How to analyze a C++ header file with a clang tool?

Laszlo Nagy rizsotto.mailinglist at gmail.com
Wed Jun 4 02:06:57 PDT 2014


an easy workaround could be to create a source file which contains only
include directives of the desired header files.


On Wed, Jun 4, 2014 at 2:51 AM, Manasij Mukherjee <manasij7479 at gmail.com>
wrote:

> Hi
> I have seen the examples in clang/tools/, and even built a few simple
> tools myself.
> But all of them work on source files.
> For example, I am not sure if I can use clang-check on a header file.
>
> How do I write a clang tool that will allow me to read a header file and
> ..say.. print the names of all the top level declarations?
> This is easy for a source file but I can not figure out how to handle
> headers.
>
> Manasij Mukherjee
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140604/8fc234b7/attachment.html>


More information about the cfe-dev mailing list