Menu

1 / 2

War of the Worlds: C++ Namespaces vs Doxygen @addtogroup

DEV Community: cpp·Flude team·9 days ago
#nBsaZm90
#devtocpp#devto#dev#parser#group
Long article (537 words) — no AI summary yet.
Reading 0:00
15s threshold

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.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.