Commit 2349e8d
committed
docugen: walk past private snake_case helpers so the doc lands on the public macro
DocuGen attached a doc-comment block to whichever symbol came right
after it. The Phase 2 / R2 Str-overload work introduced a recurring
shape where the public surface lives in a MISRA_OVERLOAD + _Generic
macro stack that sits BELOW the snake_case implementation helpers:
/// doc block
T snake_zstr(...);
T snake_str(...);
#define PascalName(...) MISRA_OVERLOAD(PascalName, __VA_ARGS__)
#define PascalName_1(...) _Generic(...)
#define PascalName_2(...) _Generic(...)
The previous logic landed the doc on snake_zstr (which is private and
therefore dropped), then broke out of the search. Result: BitVecFromStr,
IntFromStr, FloatFromStr, SocketAddrParse, KvConfigGet[*],
HttpRequestParse, MachoCacheResolve, and ~45 other public macros never
made it into the generated site.
Fix: treat 'private' the same as 'plumbing' in the per-block walk --
skip the declaration and keep looking for a public symbol to attach
to (numbered MISRA_OVERLOAD arms already did this). The natural
blank-line boundary still terminates the search, so docs only attach
to the directly-following public-API stack.
Confirmed by running DocuGen on Include/Misra/Std/Container/BitVec:
generated-doc-BitVecFromStr.md and generated-doc-BitVecTryFromStr.md
now appear with the right description, parameters, and tags. Full-tree
run produces 1141 docs vs. ~1090 before, with the formerly-missing
overloaded APIs now indexed.1 parent 79152fe commit 2349e8d
1 file changed
Lines changed: 19 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
263 | 278 | | |
264 | 279 | | |
265 | 280 | | |
| |||
0 commit comments