https://github.com/hulxv created 
https://github.com/llvm/llvm-project/pull/135505

While reading the code, I found some dead variables that are not used anymore 
but it still declared without removing them. I think it should be removed.

CC @ilovepi @petrhosek 

>From 5c2d71ade401ad29335d1518ff48d9bad844da5a Mon Sep 17 00:00:00 2001
From: hulxv <hul...@gmail.com>
Date: Sat, 12 Apr 2025 03:05:44 +0200
Subject: [PATCH] [clang-doc][NFC] clean unused variable in HTML generator

---
 clang-tools-extra/clang-doc/HTMLGenerator.cpp | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/clang-tools-extra/clang-doc/HTMLGenerator.cpp 
b/clang-tools-extra/clang-doc/HTMLGenerator.cpp
index cb10f16804024..aceb83e8c4c57 100644
--- a/clang-tools-extra/clang-doc/HTMLGenerator.cpp
+++ b/clang-tools-extra/clang-doc/HTMLGenerator.cpp
@@ -716,7 +716,6 @@ genHTML(const EnumInfo &I, const ClangDocContext &CDCtx) {
 
   maybeWriteSourceFileRef(Out, CDCtx, I.DefLoc);
 
-  std::string Description;
   if (!I.Description.empty())
     Out.emplace_back(genHTML(I.Description));
 
@@ -759,7 +758,6 @@ genHTML(const FunctionInfo &I, const ClangDocContext &CDCtx,
 
   maybeWriteSourceFileRef(Out, CDCtx, I.DefLoc);
 
-  std::string Description;
   if (!I.Description.empty())
     Out.emplace_back(genHTML(I.Description));
 
@@ -777,7 +775,6 @@ genHTML(const NamespaceInfo &I, Index &InfoIndex, const 
ClangDocContext &CDCtx,
 
   Out.emplace_back(std::make_unique<TagNode>(HTMLTag::TAG_H1, InfoTitle));
 
-  std::string Description;
   if (!I.Description.empty())
     Out.emplace_back(genHTML(I.Description));
 
@@ -820,7 +817,6 @@ genHTML(const RecordInfo &I, Index &InfoIndex, const 
ClangDocContext &CDCtx,
 
   maybeWriteSourceFileRef(Out, CDCtx, I.DefLoc);
 
-  std::string Description;
   if (!I.Description.empty())
     Out.emplace_back(genHTML(I.Description));
 

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to