[cfe-dev] Headers from C++ standard

Craig, Ben via cfe-dev cfe-dev at lists.llvm.org
Mon May 9 06:34:37 PDT 2016


I don't know if this is 'correct' enough, but the libcxx headers that 
correspond to standards defined headers usually (maybe always?) have a 
comment at the top that is basically the standard synopsis.  There are 
some things in the header comment that aren't in the standard synopsis, 
such as '// C++14' and '// C++17' comments.  But maybe it's good enough 
for what you are looking for?


On 5/9/2016 8:30 AM, Eric Liu via cfe-dev wrote:
> 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
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160509/6c84eafa/attachment.html>


More information about the cfe-dev mailing list