Author: aaronballman
Date: Tue Oct 13 13:13:10 2015
New Revision: 250194
URL: http://llvm.org/viewvc/llvm-project?rev=250194&view=rev
Log:
Updating the documentation for the
readability-inconsistent-declaration-parameter-name checker.
Patch by Piotr Dziwinski.
Modified:
clang-tools-extra/trunk/docs/clang-tidy/checks/readability-inconsistent-declaration-parameter-name.rst
Modified:
clang-tools-extra/trunk/docs/clang-tidy/checks/readability-inconsistent-declaration-parameter-name.rst
URL:
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/readability-inconsistent-declaration-parameter-name.rst?rev=250194&r1=250193&r2=250194&view=diff
==============================================================================
---
clang-tools-extra/trunk/docs/clang-tidy/checks/readability-inconsistent-declaration-parameter-name.rst
(original)
+++
clang-tools-extra/trunk/docs/clang-tidy/checks/readability-inconsistent-declaration-parameter-name.rst
Tue Oct 13 13:13:10 2015
@@ -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.
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits