Five days after we taught our parser to read kind="group" files from Doxygen's XML output (to save the "missing" free functions), our systematic parity check of the AST parser on a real corpus revealed wild architectural anomalies.
Doxygen is famous for mixing the visual structure of documentation (how humans want to read it) with the real semantics of C++ code (how the code works). The @addtogroup tag is a prime example of this. And our parser fell victim to this mixing on two independent fronts at once.
Trigger 1: Phantom Namespaces
We took the first hit from global functions without namespaces. A real example from the corpus: the global function cvFloor , documented inside the @addtogroup core_utils group.
In the XML file for this group, the cvFloor function lacked a <qualifiedname> tag entirely.…