================
@@ -156,17 +156,20 @@ static void writeNameLink(const StringRef &CurrentPath,
const Reference &R,
static void genMarkdown(const ClangDocContext &CDCtx, const EnumInfo &I,
llvm::raw_ostream &OS) {
+ OS << "| enum ";
if (I.Scoped)
- writeLine("| enum class " + I.Name + " |", OS);
- else
- writeLine("| enum " + I.Name + " |", OS);
- writeLine("--", OS);
+ OS << "class ";
+ OS << (I.Name.empty() ? StringRef("(unnamed)") : StringRef(I.Name)) << " ";
----------------
ilovepi wrote:
Unless Im missing something, these don't need to be wrapped in `StringRef`.
The first is `const char*`, and I.Name is either `sd::string` or already a
`StringRef`.
```suggestion
OS << (I.Name.empty() ? "(unnamed)" : I.Name) << " ";
```
https://github.com/llvm/llvm-project/pull/181347
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits