summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/docs/clang-tidy
diff options
context:
space:
mode:
authorJonathan Roelofs <jonathan@codesourcery.com>2016-01-13 17:36:41 +0000
committerJonathan Roelofs <jonathan@codesourcery.com>2016-01-13 17:36:41 +0000
commitd60388a9852f4a1b40b863a4736e8c9b87c478b0 (patch)
tree36a70b21061a7e475119405e155af2edfd03e047 /clang-tools-extra/docs/clang-tidy
parent3f01e7a62edbcde0c87164b24aa9da9ca04ab7bd (diff)
downloadbcm5719-llvm-d60388a9852f4a1b40b863a4736e8c9b87c478b0.tar.gz
bcm5719-llvm-d60388a9852f4a1b40b863a4736e8c9b87c478b0.zip
Teach clang-tidy how to upgrade warnings into errors.
Similar in format to the `-checks=` argument, this new `-warnings-as-errors=` argument upgrades any warnings emitted by the former to errors. http://reviews.llvm.org/D15528 llvm-svn: 257642
Diffstat (limited to 'clang-tools-extra/docs/clang-tidy')
-rw-r--r--clang-tools-extra/docs/clang-tidy/index.rst5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang-tools-extra/docs/clang-tidy/index.rst b/clang-tools-extra/docs/clang-tidy/index.rst
index 6dce4102bb5..812b6577936 100644
--- a/clang-tools-extra/docs/clang-tidy/index.rst
+++ b/clang-tools-extra/docs/clang-tidy/index.rst
@@ -68,7 +68,9 @@ 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.
+already turned on in build configuration. The ``-warnings-as-errors=`` option
+upgrades any warnings emitted under the ``-checks=`` flag to errors (but it
+does not enable any checks itself).
Clang diagnostics have check names starting with ``clang-diagnostic-``.
Diagnostics which have a corresponding warning option, are named
@@ -150,6 +152,7 @@ An overview of all the command-line options:
-checks=* to list all available checks.
-p=<string> - Build path
-system-headers - Display the errors from system headers.
+ -warnings-as-errors=<string> - Upgrades warnings to errors. Same format as '-checks'.
-p <build-path> is used to read a compile command database.
OpenPOWER on IntegriCloud