From 2d1fa58fa958d603d1b29957fe846ec2702e3f7a Mon Sep 17 00:00:00 2001
From: Dmitri Gribenko
pointer_with_type_tag
and type_tag_for_datatype
attributes in Clang language extensions documentation.
+Clang now supports documentation comments written in a Doxygen-like syntax. +Clang parses the comments and can detect syntactic and semantic errors in +comments. These warnings are off by default. Pass -Wdocumentation +flag to enable warnings about documentation comments.
+ +For example, given:
+ +/// \param [in] Str the string. +/// \returns a modified string. +void do_something(const std::string &str);+ +
clang -Wdocumentation will emit two warnings:
+ +doc-test.cc:3:6: warning: '\returns' command used in a comment that is attached to a function returning void [-Wdocumentation] +/// \returns a modified string. + ~^~~~~~~~~~~~~~~~~~~~~~~~~~ +doc-test.cc:2:17: warning: parameter 'Str' not found in the function declaration [-Wdocumentation] +/// \param [in] Str the string. + ^~~ +doc-test.cc:2:17: note: did you mean 'str'? +/// \param [in] Str the string. + ^~~ + str+ +
libclang includes a new API, clang_FullComment_getAsXML, to convert +comments to XML documents. This API can be used to build documentation +extraction tools.
+