BotellaA created this revision.
BotellaA added a reviewer: juliehockett.
BotellaA added a project: clang-tools-extra.
Herald added a project: All.
BotellaA requested review of this revision.
Herald added a subscriber: cfe-commits.

Current implementation outputs the parameter name when used with @param (or 
@tparam) doxygen tag but not the comment itself.


https://reviews.llvm.org/D156322

Files:
  clang-tools-extra/clang-doc/MDGenerator.cpp


Index: clang-tools-extra/clang-doc/MDGenerator.cpp
===================================================================
--- clang-tools-extra/clang-doc/MDGenerator.cpp
+++ clang-tools-extra/clang-doc/MDGenerator.cpp
@@ -82,10 +82,14 @@
     OS << genEmphasis(I.Name) << " " << I.Text;
   } else if (I.Kind == "ParamCommandComment") {
     std::string Direction = I.Explicit ? (" " + I.Direction).str() : "";
-    OS << genEmphasis(I.ParamName) << I.Text << Direction << "\n\n";
+    OS << genEmphasis(I.ParamName) << I.Text << Direction;
+    for (const auto &Child : I.Children)
+      writeDescription(*Child, OS);
   } else if (I.Kind == "TParamCommandComment") {
     std::string Direction = I.Explicit ? (" " + I.Direction).str() : "";
-    OS << genEmphasis(I.ParamName) << I.Text << Direction << "\n\n";
+    OS << genEmphasis(I.ParamName) << I.Text << Direction;
+    for (const auto &Child : I.Children)
+      writeDescription(*Child, OS);
   } else if (I.Kind == "VerbatimBlockComment") {
     for (const auto &Child : I.Children)
       writeDescription(*Child, OS);


Index: clang-tools-extra/clang-doc/MDGenerator.cpp
===================================================================
--- clang-tools-extra/clang-doc/MDGenerator.cpp
+++ clang-tools-extra/clang-doc/MDGenerator.cpp
@@ -82,10 +82,14 @@
     OS << genEmphasis(I.Name) << " " << I.Text;
   } else if (I.Kind == "ParamCommandComment") {
     std::string Direction = I.Explicit ? (" " + I.Direction).str() : "";
-    OS << genEmphasis(I.ParamName) << I.Text << Direction << "\n\n";
+    OS << genEmphasis(I.ParamName) << I.Text << Direction;
+    for (const auto &Child : I.Children)
+      writeDescription(*Child, OS);
   } else if (I.Kind == "TParamCommandComment") {
     std::string Direction = I.Explicit ? (" " + I.Direction).str() : "";
-    OS << genEmphasis(I.ParamName) << I.Text << Direction << "\n\n";
+    OS << genEmphasis(I.ParamName) << I.Text << Direction;
+    for (const auto &Child : I.Children)
+      writeDescription(*Child, OS);
   } else if (I.Kind == "VerbatimBlockComment") {
     for (const auto &Child : I.Children)
       writeDescription(*Child, OS);
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to