================
@@ -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.
+ if (const auto *FD = dyn_cast<FunctionDecl>(Decl.getDeclContext()))
----------------
tcottin wrote:
Instead of casting to `FunctionDecl` I use `NamedDecl` now.
This also works for function templates
https://github.com/llvm/llvm-project/pull/150790
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits