[clang-tools-extra] 8e804dc - [clang-doc][NFC] Delete redundant lines in JSONGenerator (#191011)

via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 9 11:01:58 PDT 2026


Author: Erick Velez
Date: 2026-04-09T11:01:52-07:00
New Revision: 8e804dca50049a4ed192a733e8f95e05d5ddcfdf

URL: https://github.com/llvm/llvm-project/commit/8e804dca50049a4ed192a733e8f95e05d5ddcfdf
DIFF: https://github.com/llvm/llvm-project/commit/8e804dca50049a4ed192a733e8f95e05d5ddcfdf.diff

LOG: [clang-doc][NFC] Delete redundant lines in JSONGenerator (#191011)

During the merging for the Mustache MD backend, I forgot to delete the
earlier, obsolete serialization for namespaces. It's being overwritten
by the correct call later. Also deletes a duplicate typedef.

Added: 
    

Modified: 
    clang-tools-extra/clang-doc/JSONGenerator.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clang-doc/JSONGenerator.cpp b/clang-tools-extra/clang-doc/JSONGenerator.cpp
index 8db7eaafcfb30..ccc0314ba5dde 100644
--- a/clang-tools-extra/clang-doc/JSONGenerator.cpp
+++ b/clang-tools-extra/clang-doc/JSONGenerator.cpp
@@ -460,8 +460,6 @@ void JSONGenerator::serializeMDReference(const Reference &Ref,
   ReferenceObj["BasePath"] = Path;
 }
 
-typedef std::function<void(const Reference &, Object &)> ReferenceFunc;
-
 // Although namespaces and records both have ScopeChildren, they serialize them
 // 
diff erently. Only enums, records, and typedefs are handled here.
 void JSONGenerator::serializeCommonChildren(
@@ -772,12 +770,6 @@ void JSONGenerator::serializeInfo(const NamespaceInfo &I, json::Object &Obj) {
   if (I.USR == GlobalNamespaceID)
     Obj["Name"] = "Global Namespace";
 
-  if (!I.Children.Namespaces.empty()) {
-    serializeArray(I.Children.Namespaces, Obj, "Namespaces",
-                   serializeReferenceLambda());
-    Obj["HasNamespaces"] = true;
-  }
-
   if (!I.Children.Functions.empty()) {
     serializeArray(I.Children.Functions, Obj, "Functions",
                    serializeInfoLambda());


        


More information about the cfe-commits mailing list