Introduction to libclang
libclang provides a nice interface for using Clang’s knowledge of C and similar languages to find information about source files. It’s possible to create and walk the abstract syntax tree, generate errors and warnings, and even perform autocompletion. I’ve only scratched the surface of what’s possible, but I hope it’s enough to get you started.