DocExtractor

Note

Generated from the C++ headers by apiary --emit-cpp-docs-json.

std::string clean_raw_comment(llvm::StringRef text)

Cleans a raw comment block (/** ... */ or /// ...) into doxygen body text.

Strips comment markers, leading *, and banner lines. Shared by extract_doc (AST decls) and the macro scanner (raw #define text).

Parameters:

text – The raw comment block to clean.

Returns:

The cleaned doxygen body text.

std::string extract_doc(const clang::Decl *decl, clang::ASTContext &ctx)

Returns the cleaned doxygen comment associated with decl.

Cleaning strips ///, /**, */, and leading * markers but otherwise preserves the text verbatim — Phase 2 keeps escaping/markdown conversion out of scope (Phase 3 polish handles \param / \return reflow).

Parameters:
  • decl – The declaration to extract the doc-comment from.

  • ctx – The AST context owning decl.

Returns:

The cleaned doxygen comment, or an empty string if the declaration has no doc-comment.