[clang-tools-extra] eef9782 - [clang-doc][NFC] clean unused variable in HTML generator (#135505)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 16 17:16:15 PDT 2025
Author: Mohamed Emad
Date: 2025-04-16T17:16:12-07:00
New Revision: eef978290ccb847c67bf0431e5fdd1dc4c7d408d
URL: https://github.com/llvm/llvm-project/commit/eef978290ccb847c67bf0431e5fdd1dc4c7d408d
DIFF: https://github.com/llvm/llvm-project/commit/eef978290ccb847c67bf0431e5fdd1dc4c7d408d.diff
LOG: [clang-doc][NFC] clean unused variable in HTML generator (#135505)
While reading the code, I found some dead variables that are not used
anymore but it still declared without removing them.
Added:
Modified:
clang-tools-extra/clang-doc/HTMLGenerator.cpp
Removed:
################################################################################
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));
More information about the cfe-commits
mailing list