[PATCH] D63180: [clang-doc] Adds HTML generator

Diego Astiazarán via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 26 17:47:39 PDT 2019


DiegoAstiazaran marked 4 inline comments as done.
DiegoAstiazaran added inline comments.


================
Comment at: clang-tools-extra/clang-doc/HTMLGenerator.cpp:106-107
+
+  std::string Buffer;
+  llvm::raw_string_ostream Members(Buffer);
+  if (!I.Members.empty())
----------------
jakehehrlich wrote:
> This is a generally bad pattern.
Some of the uses of an intermediate ostream have been deleted but I consider that some are still useful.
One of them is the when rendering the list of Enum Members, after generating a list of <li>'s, we require the intermediate ostream to put it between the ul tags. I consider that's better than:

```
OS << "<ul>\n";
for (...)
  OS << ...;
OS << "</ul>\n";
```


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63180/new/

https://reviews.llvm.org/D63180





More information about the cfe-commits mailing list