Add documentation for clang-format.
This adds documentation for both LibFormat as well as the standalone
tools and integrations built on top of it. It slightly restructures
the ClangTools documentation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172004 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/docs/ClangTools.rst b/docs/ClangTools.rst
index 3839e70..8d5f100 100644
--- a/docs/ClangTools.rst
+++ b/docs/ClangTools.rst
@@ -1,9 +1,9 @@
-===========
-Clang Tools
-===========
+========
+Overview
+========
Clang Tools are standalone command line (and potentially GUI) tools
-design for use by C++ developers who are already using and enjoying
+designed for use by C++ developers who are already using and enjoying
Clang as their compiler. These tools provide developer-oriented
functionality such as fast syntax checking, automatic formatting,
refactoring, etc.
@@ -73,14 +73,25 @@
``clang-check``
---------------
-This tool combines the LibTooling framework for running a Clang tool
-with the basic Clang diagnostics by syntax checking specific files in a
-fast, command line interface. It can also accept flags to re-display the
-diagnostics in different formats with different flags, suitable for use
-driving an IDE or editor. Furthermore, it can be used in fixit-mode to
-directly apply fixit-hints offered by clang.
+:doc:`ClangCheck` combines the LibTooling framework for running a
+Clang tool with the basic Clang diagnostics by syntax checking specific files
+in a fast, command line interface. It can also accept flags to re-display the
+diagnostics in different formats with different flags, suitable for use driving
+an IDE or editor. Furthermore, it can be used in fixit-mode to directly apply
+fixit-hints offered by clang. See :doc:`HowToSetupToolingForLLVM` for
+instructions on how to setup and used `clang-check`.
-FIXME: Link to user-oriented clang-check documentation.
+``clang-format``
+~~~~~~~~~~~~~~~~
+
+Clang-format is both a :doc:`library <LibFormat>` and a :doc:`stand-alone tool
+<ClangFormat>` with the goal of automatically reformatting C++ sources files
+according to configurable style guides. To do so, clang-format users Clang's
+Lexer to transform an input file into a token stream and then changes all the
+whitespace around those tokens. The goal is for clang-format to both serve
+both as a user tool (ideally with powerful IDE integrations) and part of other
+refactoring tools, e.g. to do a reformatting of all the lines changed during a
+renaming.
Extra Clang Tools
=================