summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2016-02-08 15:09:28 +0000
committerAlexander Kornienko <alexfh@google.com>2016-02-08 15:09:28 +0000
commita7faa5b92aa16c94eff11d1fcb7a650f061422a5 (patch)
tree824e9ccfeec1f252bc4a9967e3c57ae8fc6bf417
parent54391c8ca64570220798d224323c6d1427e1c86c (diff)
downloadbcm5719-llvm-a7faa5b92aa16c94eff11d1fcb7a650f061422a5.tar.gz
bcm5719-llvm-a7faa5b92aa16c94eff11d1fcb7a650f061422a5.zip
[clang-tidy] Update documentation
Summary: We have 2 scripts add_new_check.py and rename_check.py to bootstrap a new check creation. There is also clang-query to aid with the matcher creation. These were not mentioned in the current document, add them so it's available to the masses. Reviewers: alexfh Patch by Deniz Türkoglu! Differential Revision: http://reviews.llvm.org/D16944 llvm-svn: 260098
-rw-r--r--clang-tools-extra/docs/clang-tidy/index.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang-tools-extra/docs/clang-tidy/index.rst b/clang-tools-extra/docs/clang-tidy/index.rst
index 8a1e8e6f02f..f8daae08298 100644
--- a/clang-tools-extra/docs/clang-tidy/index.rst
+++ b/clang-tools-extra/docs/clang-tidy/index.rst
@@ -229,11 +229,20 @@ checks, but its power is in the ability to easily write custom checks.
Checks are organized in modules, which can be linked into :program:`clang-tidy`
with minimal or no code changes in clang-tidy.
+``add_new_check.py`` is a script to automate the process of adding a new check,
+it will create the check, update the CMake file and create a test.
+
+``rename_check.py`` does what the script name suggest, renames an existsing
+check.
+
Checks can plug the analysis on the preprocessor level using `PPCallbacks`_ or
on the AST level using `AST Matchers`_. When an error is found, checks can
report them in a way similar to how Clang diagnostics work. A fix-it hint can be
attached to a diagnostic message.
+To find out what matchers you can add, we recommend using :program:`clang-query`,
+it's a tool is for interactive exploration of the Clang AST using AST matchers.
+
The interface provided by clang-tidy makes it easy to write useful and precise
checks in just a few lines of code. If you have an idea for a good check, the
rest of this document explains how to do this.
OpenPOWER on IntegriCloud