================
@@ -156,19 +156,17 @@ static void writeNameLink(const StringRef &CurrentPath, 
const Reference &R,
 
 static void genMarkdown(const ClangDocContext &CDCtx, const EnumInfo &I,
                         llvm::raw_ostream &OS) {
-  std::string Header = "| enum ";
+  OS << "| enum ";
   if (I.Scoped)
-    Header += "class ";
-  Header += I.Name;
-  Header += " ";
-  if (I.BaseType && I.BaseType->Type.QualName != "") {
-    Header += ": ";
-    Header += I.BaseType->Type.QualName;
-    Header += " ";
+    OS << "class ";
+  if(I.Name.empty())
+    OS << "(unnamed) ";
+  else
+    OS << I.Name << " ";
----------------
ilovepi wrote:

```suggestion
  OS <<  (I.Name.empty() ? "(unnamed)" : I.Name) << " ";
```
Assuming this is needed.

https://github.com/llvm/llvm-project/pull/181347
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to