[PATCH] D63666: [clang-doc] Add templates to HTML generator

Diego Astiazarán via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 21 13:16:21 PDT 2019


DiegoAstiazaran created this revision.
DiegoAstiazaran added reviewers: juliehockett, jakehehrlich, lebedev.ri.
DiegoAstiazaran added a project: clang-tools-extra.
Herald added a subscriber: mgorny.

Templates are added to create a stuctured HTML file.
Commands in doxygen comments are still not handled and the command is displayed in the output.
In HTMLGenerator.cpp .str().str().c_str() is done several times, this is necesary to covert a SmallString object to a char pointer: SmallString->StringRef->string->char*. SmallString and string can't be used because function applyHTMLTemplate is variadic and it requires its arguments to be of a trivial type. StringRef can't be used because its data may not be null terminated. StringRef has a c_str method but it's not constant. It is being considered to change the SmallString attributes to a string to avoid this, but it would be done later.

Depends on D63180 <https://reviews.llvm.org/D63180>.


https://reviews.llvm.org/D63666

Files:
  clang-tools-extra/clang-doc/CMakeLists.txt
  clang-tools-extra/clang-doc/HTMLGenerator.cpp
  clang-tools-extra/clang-doc/HTMLTemplates.cpp
  clang-tools-extra/clang-doc/HTMLTemplates.h
  clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63666.206059.patch
Type: text/x-patch
Size: 36256 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190621/d4d6d376/attachment-0001.bin>


More information about the cfe-commits mailing list