[PATCH] D63857: [clang-doc] Structured HTML generator
Diego Astiazarán via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 28 14:56:27 PDT 2019
DiegoAstiazaran added inline comments.
================
Comment at: clang-tools-extra/clang-doc/HTMLGenerator.cpp:91
+struct HTMLFile {
+ llvm::SmallString<16> DoctypeDecl{"<!DOCTYPE html>"};
+ std::vector<std::unique_ptr<HTMLNode>> Children; // List of child nodes
----------------
jakehehrlich wrote:
> Does this ever change? If not this should be a global constexpr constant char* inside of an anon-namespace.
>
> e.g.
>
> namespace {
> constexpr const char* kDoctypeDecl = "...";
> }
In HTML5 it's always `<!DOCTYPE html>` so I've already changed it in the latest patch.
================
Comment at: clang-tools-extra/clang-doc/HTMLGenerator.cpp:170
+ OS << " " << A.getKey() << "=\"" << A.getValue() << "\"";
+ OS << (SelfClosing ? "/>" : ">");
+ if (!InlineChildren)
----------------
jakehehrlich wrote:
> You can exit here if its self closing right?
Yes, fixed in the latest patch update.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63857/new/
https://reviews.llvm.org/D63857
More information about the cfe-commits
mailing list