[cfe-dev] Headers from C++ standard

Eric Liu via cfe-dev cfe-dev at lists.llvm.org
Mon May 9 06:30:26 PDT 2016


Hi Richard,

*Background*: I am writing a tool to retrieve all symbols and its
information from C++ standard library for #include_fixer (a tool that can
automatically find the right #include headers for unidentified symbols in
C++ code). My current solution is running FindAllSymbol
<http://reviews.llvm.org/D19482> tool across all C++ standard headers in
the system include path, e.g. header files under */usr/include/c++/4.8.4/*
directory in my own machine. However, this solution can be problematic
since there can be multiple headers that export the same symbol. For
example, "vector" can be #include'd via either <algorithm> or <queue>
besides <vector> itself.

As an alternative, we are thinking about parsing header synopses from C++
standard. So, we are wondering if there are existing syntax-correct header
synopses in the form of C++ header files somewhere that we can use. If not,
Manual(@klimek) suggests that maybe we could have the header synopses as
C++ header files and have the standard draft includes them so that syntax
can be easily checked, and we can conveniently parse the synopses too.

Regards,
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160509/66a85e91/attachment.html>


More information about the cfe-dev mailing list