[Clang] ExtractAPI C++ Support

Description of the project: Swift-DocC is the canonical documentation compiler for the Swift OSS project. However Swift-DocC is not Swift specific and uses SymbolKit's languaguage agnostic JSON-based symbol graph format to understand which symbols are available in the code, this way any language can be supported by Swift-DocC as long as there is a symbol graph generator.

Clang supports symbol graph generation for C and Objective-C as described in [RFC] clang support for API information generation in JSON.

Currently the emitted symbol graph format does not support various C++ constructs such as templates and exceptions and the symbol graph generator does not fully understand C++. This project aims to introduce support for various C++ constructs in the symbol graph format and to implement support for generating this data in clang.

Expected result: Adding the necessary support to clang's symbol graph generator and in libclang for describing categories of symbols defined in other modules. This will involve additions to SymbolKit that would need to be discussed with that community.

Desirable skills: Intermediate C++ programming skills; familiarity with clang and Objective-C are assets but not required.

Project size: Large

Difficulty: Medium/Hard

Confirmed Mentors: Daniel Grumberg, Zixu Wang, Juergen Ributzka

Hello, I am very interested in this project for GSOC.

From what I understand, one will have to add support to the SymbolKit format to allow it to support C++ structures and then add that support into clang. Am I correct in understanding that ExtractAPI is just as language-agnostic as SymbolKit? Thus, it doesn’t know the language it is parsing and just identifies the structures that are defined within SymbolKit?

Also, is the scope of this project full C++ support?

Hi @evelez,

SymbolKit is fully language agnostic and most constructs are already supported. Nonetheless, the SymbolKit project is owned by the Swift community and if additions to the format need to be made to support C++ constructs, I would expect you to work with them to get new things into the format.

Nominally the scope of the project is full C++ support, but I am aware that this could be a big undertaking. My expectation is that whoever chooses to do this project would prioritize which C++ features to support and implement support for as many of them as possible within the allocated timeframe.

Hope this helps!