Are there any disadvantages with using a compiler front-end?
– Yes. Several limitations of this approach became visible when using Cppp [which is now no longer part of the source-tree]. The biggest problem is complexity, as it can be rather complex to dive into the trees to get info. Some info may not be in the trees semantic processing. Among them is the name of arguments in your function declarations, though the names of arguments in the definition is available (and are used) in the argument scope. And you can’t document macros in C/C++ for obvious reasons (this can be solved easily by adding a primitive pre-processor). But you get full access to the code and can document whatever you want, and that is what you really want, no?