[cfe-dev] LibTooling and Header files confirmation

DbdM Tbt spin.x2k at gmail.com
Thu May 1 20:10:13 PDT 2014


Good day,
I have some aspects I would like confirm about reading header files in the
context of LibTooling.
My initial idea is that clang, as a compiler framework, mainly 'works with
source files'.
Header files will come in during pre-processing via the #include directive.
But I wanted to see for myself how libtooling works with header files
explicitly passed as argument. For this experiment, I used clang-check.
Eventually, I came across this question:
http://stackoverflow.com/questions/19413156/clang-cant-parse-my-h-file-standalone
Confirmation #1: Is there an official documentation/url/FAQ where it is
written that clang treats *.h files as C header files?
 Or rather, perhaps there is a documentation as to the list of file
extensions with the description as to what actions clang will take?
Confirmation #2: I tried checking the help for clang-check and I am not
sure how to pass an argument similar to "-x c++" to it. Is it possible?
Confirmation #3: Is there a 'correct' approach with regards to libtooling
and handling header files? I am planning on ignoring header files passed to
my libtool.
Hoping for your insights.
Thank you,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140502/0957180f/attachment.html>


More information about the cfe-dev mailing list