summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2014-07-16 13:26:51 +0000
committerAlexander Kornienko <alexfh@google.com>2014-07-16 13:26:51 +0000
commitc5ac729131abfb35f56769a9a7b299e4e3432c50 (patch)
treeca0aee6ae4821e0e2fce2c6ed71d7c01224917d5
parentf5965392880f169bf1e469d008b13b3b9b789a55 (diff)
downloadbcm5719-llvm-c5ac729131abfb35f56769a9a7b299e4e3432c50.tar.gz
bcm5719-llvm-c5ac729131abfb35f56769a9a7b299e4e3432c50.zip
Added documentation on how clang diagnostics are reported by clang-tidy.
llvm-svn: 213147
-rw-r--r--clang-tools-extra/docs/clang-tidy.rst15
1 files changed, 13 insertions, 2 deletions
diff --git a/clang-tools-extra/docs/clang-tidy.rst b/clang-tools-extra/docs/clang-tidy.rst
index c25164ef2e5..e2eb6479998 100644
--- a/clang-tools-extra/docs/clang-tidy.rst
+++ b/clang-tools-extra/docs/clang-tidy.rst
@@ -14,7 +14,7 @@ Using clang-tidy
:program:`clang-tidy` is a `LibTooling`_-based tool, and it's easier to work
with if you set up a compile command database for your project (for an example
-of how to do this see `How To Setup Tooling For LLVM`_ ). You can also specify
+of how to do this see `How To Setup Tooling For LLVM`_). You can also specify
compilation options on the command line after ``--``:
.. code-block:: bash
@@ -39,7 +39,7 @@ The ``-list-checks`` option lists all the enabled checks. When used without
available checks or with any other value of ``-checks=`` to see which checks are
enabled by this value.
-There are currently three groups of checks:
+There are currently the following groups of checks:
* Checks related to the LLVM coding conventions have names starting with
``llvm-``.
@@ -52,6 +52,17 @@ There are currently three groups of checks:
* Clang static analyzer checks are named starting with ``clang-analyzer-``.
+Clang diagnostics are treated in a similar way as check diagnostics. Clang
+diagnostics are displayed by clang-tidy and can be filtered out using
+``-checks=`` option. However, the ``-checks=`` option does not affect
+compilation arguments, so it can not turn on Clang warnings which are not
+already turned on in build configuration.
+
+Clang diagnostics have check names starting with ``clang-diagnostic-``.
+Diagnostics which have a corresponding warning option, are named
+``clang-diagostic-<warning-option>``, e.g. Clang warning controlled by
+``-Wliteral-conversion`` will be reported with check name
+``clang-diagnostic-literal-conversion``.
The ``-fix`` flag instructs :program:`clang-tidy` to fix found errors if
supported by corresponding checks.
OpenPOWER on IntegriCloud