[clang] [clang-tools-extra] [llvm] [clangd] introduce doxygen parser (PR #150790)

Maksim Ivanov via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 28 18:19:10 PDT 2025


================
@@ -1538,21 +1704,22 @@ markup::Document HoverInfo::present() const {
 std::string HoverInfo::present(MarkupKind Kind) const {
   if (Kind == MarkupKind::Markdown) {
     const Config &Cfg = Config::current();
-    if ((Cfg.Documentation.CommentFormat ==
-         Config::CommentFormatPolicy::Markdown) ||
-        (Cfg.Documentation.CommentFormat ==
-         Config::CommentFormatPolicy::Doxygen))
-      // If the user prefers Markdown, we use the present() method to generate
-      // the Markdown output.
-      return present().asMarkdown();
+    if (Cfg.Documentation.CommentFormat ==
+        Config::CommentFormatPolicy::Markdown)
+      return presentDefault().asMarkdown();
+    if (Cfg.Documentation.CommentFormat ==
+        Config::CommentFormatPolicy::Doxygen) {
+      std::string T = presentDoxygen().asMarkdown();
----------------
emaxx-google wrote:

nit: The variable isn't needed.

https://github.com/llvm/llvm-project/pull/150790


More information about the llvm-commits mailing list