[clang-tools-extra] r213147 - Added documentation on how clang diagnostics are reported by clang-tidy.

Alexander Kornienko alexfh at google.com
Wed Jul 16 06:26:52 PDT 2014


Author: alexfh
Date: Wed Jul 16 08:26:51 2014
New Revision: 213147

URL: http://llvm.org/viewvc/llvm-project?rev=213147&view=rev
Log:
Added documentation on how clang diagnostics are reported by clang-tidy.

Modified:
    clang-tools-extra/trunk/docs/clang-tidy.rst

Modified: clang-tools-extra/trunk/docs/clang-tidy.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy.rst?rev=213147&r1=213146&r2=213147&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy.rst Wed Jul 16 08:26:51 2014
@@ -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 th
 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 chec
 
 * 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.





More information about the cfe-commits mailing list