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

Manasij Mukherjee manasij7479 at gmail.com
Thu Jun 5 00:40:06 PDT 2014


Sorry, this turned out to be a rather trivial problem.
I forgot to force C++ as the language being parsed.

So, seeing errors like <unknown type 'namespace'>, I sort of panicked!



On Thu, Jun 5, 2014 at 1:01 AM, Richard <legalize at xmission.com> wrote:

>
> In article <lmnqj7$cql$1 at ger.gmane.org>,
>     Jacob Carlborg <doob at me.com> writes:
>
> > I see. I don't use a compilation database for my tool. I'm using
> > libclang and the tool is intended to process header files. Works
> > perfectly fine.
>
> Yes, I don't think this is a limitation of the library so much as some
> of the tooling classes expect a compilation database specified as a
> command-line argument.  While preparing for my C++ Now! 2014
> presentation, I discovered that even in this case it may be possible
> to specify the actual compile command on the command-line to the tool
> and separate it from other arguments with --.  However, this depends
> on specific support for this from the tool and not every tool may
> support this (although if they immitated remove-cstr-calls, then they
> would have it).
> --
> "The Direct3D Graphics Pipeline" free book <
> http://tinyurl.com/d3d-pipeline>
>      The Computer Graphics Museum <http://ComputerGraphicsMuseum.org>
>          The Terminals Wiki <http://terminals.classiccmp.org>
>   Legalize Adulthood! (my blog) <http://LegalizeAdulthood.wordpress.com>
> _______________________________________________
> 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/20140605/990f671f/attachment.html>


More information about the cfe-dev mailing list