I'm looking for a library or tool (a C++ library would be the best for me) to get code outlining information from a source code file (.c and .cpp at least, but support for other languages would be nice).

In other words I need to obtain a list of classes, stuctures, functions, etc.

You can get an idea of what I mean looking at Visual Studio Code's outline view:

Visual Studio Code outline feature

1 Answer 1


Gnat Programming Studio has now a C/C++ mode which uses clang as a parsing library.

(free version: https://www.adacore.com/community)

It has an API, I didn't look too much into it but it's very efficient & complete. With the GPS IDE which uses clang lib, I could parse C++11 with templates without issues.


note: I'm not affiliated either to clang or AdaCore (GNATPro) software. I'm just a satisfied customer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.