[PATCH] D53382: [clang-doc] Update documentation
Julie Hockett via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 17 11:43:09 PDT 2018
juliehockett created this revision.
juliehockett added reviewers: leonardchan, jakehehrlich, lebedev.ri.
juliehockett added a project: clang-tools-extra.
https://reviews.llvm.org/D53382
Files:
clang-tools-extra/docs/clang-doc.rst
Index: clang-tools-extra/docs/clang-doc.rst
===================================================================
--- clang-tools-extra/docs/clang-doc.rst
+++ clang-tools-extra/docs/clang-doc.rst
@@ -17,27 +17,43 @@
there.
Use
-=====
+====
:program:`clang-doc` is a `LibTooling
<http://clang.llvm.org/docs/LibTooling.html>`_-based tool, and so requires a
compile command database for your project (for an example of how to do this
see `How To Setup Tooling For LLVM
<http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html>`_).
-The tool can be used on a single file or multiple files as defined in
-the compile commands database:
+By default, the tool will run on all files listed in the given compile commands
+database:
.. code-block:: console
- $ clang-doc /path/to/file.cpp -p /path/to/compile/commands
+ $ clang-doc /path/to/compile_commands.json
-This generates an intermediate representation of the declarations and their
-associated information in the specified TUs, serialized to LLVM bitcode.
+Output
+=======
-As currently implemented, the tool is only able to parse TUs that can be
-stored in-memory. Future additions will extend the current framework to use
-map-reduce frameworks to allow for use with large codebases.
+:program:`clang-doc` produces a directory of documentation. One file is produced
+for each namespace and record in the project source code, containing all
+documentation (including contained functions, methods, and enums) for that item.
+
+The top-level directory is configurable through the ``output`` flag:
+
+.. code-block:: console
+
+ $ clang-doc -output=output/directory/ compile_commands.json
+
+Configuration
+==============
+
+Configuration for :program:`clang-doc` is currently limited to command-line options.
+In the future, it may develop the ability to use a configuration file, but no such
+efforts are currently in progress.
+
+Options
+--------
:program:`clang-doc` offers the following options:
@@ -57,9 +73,11 @@
clang-doc options:
-doxygen - Use only doxygen-style comments to generate docs.
- -dump - Dump intermediate results to bitcode file.
-extra-arg=<string> - Additional argument to append to the compiler command line
-extra-arg-before=<string> - Additional argument to prepend to the compiler command line
- -omit-filenames - Omit filenames in output.
+ -format - Format for outputted docs.
+ =yaml - Documentation in YAML format.
+ =md - Documentation in MD format.
-output=<string> - Directory for outputting generated files.
-p=<string> - Build path
+ -public - Document only public declarations.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53382.170026.patch
Type: text/x-patch
Size: 2813 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181017/6cc8e702/attachment.bin>
More information about the cfe-commits
mailing list