<div dir="ltr"><div><div><div>You can get the Clang to do this, yes. <br><br></div>Depending on exactly what you need to do with the data, you may be fine to just (automatically?) produce a file that includes the base-header-file, and then pass that to `clang -Xclang -ast-dump -fsyntax-only yourfile-here.c`, and capture that output (perhaps with -fno-color-diagnostics to make it more machine readable) - along with some post-processing (e.g. some shell script or python code to parse that). <br><br></div>Otherwise, you will need to use clang and it's tool helpers as a library and build a small C++ program that invokes clang and retrieves the AST as a data-structure, and then work on that (again, depends on exactly what you want to achieve). <br><br>--<br></div>Mats<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 28 April 2015 at 16:26, Brian Hare <span dir="ltr"><<a href="mailto:bhare8972@hotmail.com" target="_blank">bhare8972@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr"><br>I am looking for some package that can parse C++ header files (hopefully recursively), and return a structure that holds all the available name information, classes, structs, namespaces, global variables, types, macros, functions, ect...<br><br>Is there a way to use Clang to do this? <br><br>Thanks!<br>                                        </div></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>