================
@@ -100,7 +101,19 @@ std::string getDeclComment(const ASTContext &Ctx, const 
NamedDecl &Decl) {
     // the comments for namespaces.
     return "";
   }
-  const RawComment *RC = getCompletionComment(Ctx, &Decl);
+
+  const RawComment *RC = nullptr;
+  const Config &Cfg = Config::current();
+
+  if (Cfg.Documentation.CommentFormat == Config::CommentFormatPolicy::Doxygen 
&&
+      isa<ParmVarDecl>(Decl)) {
+    // Parameters are documented in the function comment.
----------------
tcottin wrote:

Yes, you are right.
I fixed it by parsing the FullComment from the RawComment we get.
I extended the `SymbolDocCommentVisitor` to support parsed FullComments and 
added a function to extract parameter paragraphs as text from the FullComment.
With that only the string documenting the parameter is extracted now.

https://github.com/llvm/llvm-project/pull/150790
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to