This is an archive of the discontinued LLVM Phabricator instance.

[clang-doc] Implement a (simple) Markdown generator
ClosedPublic

Authored by juliehockett on Feb 16 2018, 5:08 PM.

Details

Summary

Implementing a simple Markdown generator from the emitted bitcode summary of declarations. Very primitive at this point, but will be expanded. Currently emits an .md file for each class and namespace, listing its contents.

For a more detailed overview of the tool, see the design document on the mailing list: http://lists.llvm.org/pipermail/cfe-dev/2017-December/056203.html

Diff Detail

Repository
rL LLVM

Event Timeline

juliehockett created this revision.Feb 16 2018, 5:08 PM

It will be good to have the tests for generators.

clang-doc/generators/Generators.h
28 ↗(On Diff #134776)

Is this code (and the code in two parent Differentials) formatted with clang-format?
This line is certainly longer than 80 columns.

Updating based on parent revision changes -- still rough, will continue to improve.

Please run Clang-format and Clang-tidy modernize.

clang-doc/generators/Generators.h
46 ↗(On Diff #135583)

Please remove semicolon after constructor body. Please enable CLang's -Wextra-semi.

47 ↗(On Diff #135583)

Please use = default;

lebedev.ri set the repository for this revision to rCTE Clang Tools Extra.
lebedev.ri removed a subscriber: lebedev.ri.
sammccall edited reviewers, added: ioeric; removed: sammccall.May 15 2018, 7:20 AM
sammccall added a subscriber: sammccall.
ioeric added inline comments.May 17 2018, 3:12 AM
clang-doc/generators/Generators.h
44 ↗(On Diff #135583)

Could you add high-level comment on what this does? This seems to build up some directory structure and write different infos into different sub-directories. Could you elaborate a bit on this?

rja added a subscriber: rja.May 17 2018, 1:38 PM
rja added inline comments.
clang-doc/generators/MDGenerator.cpp
57 ↗(On Diff #135583)

remove commented code?

Updating to reflect changes to the framework (and make it work).

Eugene.Zelenko added inline comments.Jun 20 2018, 1:43 PM
clang-tools-extra/clang-doc/MDGenerator.cpp
33 ↗(On Diff #152135)

return {};

juliehockett marked an inline comment as done.

Updating based on recent landed patches & updated tests

ioeric removed a reviewer: ioeric.Aug 6 2018, 8:05 AM
leonardchan accepted this revision.Aug 9 2018, 4:56 PM
leonardchan added inline comments.
clang-tools-extra/clang-doc/MDGenerator.cpp
79 ↗(On Diff #159091)

nit: make Num unsigned since the std::string fill ctor takes an unsigned value

This revision is now accepted and ready to land.Aug 9 2018, 4:56 PM
This revision was automatically updated to reflect the committed changes.
juliehockett marked an inline comment as done.
juliehockett reopened this revision.Aug 21 2018, 3:28 PM

Reopening because it was reverted and I haven't had time to look into it yet

This revision is now accepted and ready to land.Aug 21 2018, 3:28 PM
This revision was automatically updated to reflect the committed changes.
This revision was automatically updated to reflect the committed changes.