summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/docs/clang-tidy
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2015-10-13 18:13:10 +0000
committerAaron Ballman <aaron@aaronballman.com>2015-10-13 18:13:10 +0000
commitaf0159bafb29d0651d7092cce69b2e248e664a65 (patch)
tree0b23ceb770e56cee0c5ac886c2aaebab8cfe9050 /clang-tools-extra/docs/clang-tidy
parent4ead920ce50a6a27d29dfe3a82e1480286a667cc (diff)
downloadbcm5719-llvm-af0159bafb29d0651d7092cce69b2e248e664a65.tar.gz
bcm5719-llvm-af0159bafb29d0651d7092cce69b2e248e664a65.zip
Updating the documentation for the readability-inconsistent-declaration-parameter-name checker.
Patch by Piotr Dziwinski. llvm-svn: 250194
Diffstat (limited to 'clang-tools-extra/docs/clang-tidy')
-rw-r--r--clang-tools-extra/docs/clang-tidy/checks/readability-inconsistent-declaration-parameter-name.rst15
1 files changed, 13 insertions, 2 deletions
diff --git a/clang-tools-extra/docs/clang-tidy/checks/readability-inconsistent-declaration-parameter-name.rst b/clang-tools-extra/docs/clang-tidy/checks/readability-inconsistent-declaration-parameter-name.rst
index 872fee747da..8079396546b 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/readability-inconsistent-declaration-parameter-name.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/readability-inconsistent-declaration-parameter-name.rst
@@ -28,5 +28,16 @@ function declarations, for example:
void foo(int a);
void foo(int); // no warning
-If there are multiple declarations of same function, only one warning will be
-generated.
+To help with refactoring, in some cases FixIt hints are generated to align
+parameter names to a single naming convention. This works with the assumption
+that the function definition is the most up-to-date version, as it directly
+references parameter names in its body. Example:
+
+.. code:: c++
+
+ void foo(int a); // warning and FixIt hint (replace "a" to "b")
+ int foo(int b) { return b + 2; } // definition with use of "b"
+
+In the case of multiple redeclarations or function template specializations,
+a warning is issued for every redeclaration or specialization inconsistent with
+the definition or the first declaration seen in a translation unit.
OpenPOWER on IntegriCloud