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

Richard legalize at xmission.com
Wed Jun 4 12:31:29 PDT 2014


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>



More information about the cfe-dev mailing list