summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-pro-type-member-init.rst13
-rw-r--r--clang-tools-extra/docs/clang-tidy/checks/modernize-use-emplace.rst14
-rw-r--r--clang-tools-extra/docs/clang-tidy/checks/modernize-use-nullptr.rst7
-rw-r--r--clang-tools-extra/docs/clang-tidy/checks/performance-faster-string-find.rst18
-rw-r--r--clang-tools-extra/docs/clang-tidy/checks/readability-simplify-boolean-expr.rst17
5 files changed, 41 insertions, 28 deletions
diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-pro-type-member-init.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-pro-type-member-init.rst
index 96fc6a0696b..efbe36096af 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-pro-type-member-init.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-pro-type-member-init.rst
@@ -24,13 +24,14 @@ types without a user-provided constructor and are not initialized. The suggested
fix is to zero initialize the variable via ``{}`` for C++11 and beyond or ``=
{}`` for older language versions.
-IgnoreArrays option
--------------------
+Options
+-------
-For performance critical code, it may be important to not zero
-fixed-size array members. If on, IgnoreArrays will not warn about
-array members that are not zero-initialized during construction.
-IgnoreArrays is false by default.
+.. option:: IgnoreArrays
+
+ If set to non-zero, the check will not warn about array members that are not
+ zero-initialized during construction. For performance critical code, it may
+ be important to not initialize fixed-size array members. Default is `0`.
This rule is part of the "Type safety" profile of the C++ Core
Guidelines, corresponding to rule Type.6. See
diff --git a/clang-tools-extra/docs/clang-tidy/checks/modernize-use-emplace.rst b/clang-tools-extra/docs/clang-tidy/checks/modernize-use-emplace.rst
index a6b3baaef8f..b3ed7fa6f50 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/modernize-use-emplace.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/modernize-use-emplace.rst
@@ -22,9 +22,9 @@ Before:
std::vector<MyClass> v;
v.push_back(MyClass(21, 37));
- std::vector<std::pair<int,int>> w;
+ std::vector<std::pair<int, int>> w;
- w.push_back(std::pair<int,int>(21, 37));
+ w.push_back(std::pair<int, int>(21, 37));
w.push_back(std::make_pair(21L, 37L));
After:
@@ -34,7 +34,7 @@ After:
std::vector<MyClass> v;
v.emplace_back(21, 37);
- std::vector<std::pair<int,int>> w;
+ std::vector<std::pair<int, int>> w;
w.emplace_back(21, 37);
// This will be fixed to w.push_back(21, 37); in next version
w.emplace_back(std::make_pair(21L, 37L);
@@ -80,9 +80,11 @@ other classes use the :option:`SmartPointers` option.
Check also fires if any argument of constructor call would be:
-- bitfield (bitfields can't bind to rvalue/universal reference)
-- ``new`` expression (to avoid leak)
-or if the argument would be converted via derived-to-base cast.
+
+ - bitfield (bitfields can't bind to rvalue/universal reference)
+
+ - ``new`` expression (to avoid leak) or if the argument would be converted via
+ derived-to-base cast.
This check requires C++11 of higher to run.
diff --git a/clang-tools-extra/docs/clang-tidy/checks/modernize-use-nullptr.rst b/clang-tools-extra/docs/clang-tidy/checks/modernize-use-nullptr.rst
index 68c19c71669..fb2d3d99c51 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/modernize-use-nullptr.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/modernize-use-nullptr.rst
@@ -41,10 +41,9 @@ Options
.. option:: UserNullMacros
- By default this check will only replace the ``NULL`` macro and will skip any
- user-defined macros that behaves like ``NULL``. The user can use the
- :option:`UserNullMacros` option to specify a comma-separated list of macro
- names that will be transformed along with ``NULL``.
+ Comma-separated list of macro names that will be transformed along with
+ ``NULL``. By default this check will only replace the ``NULL`` macro and will
+ skip any similar user-defined macros.
Example
^^^^^^^
diff --git a/clang-tools-extra/docs/clang-tidy/checks/performance-faster-string-find.rst b/clang-tools-extra/docs/clang-tidy/checks/performance-faster-string-find.rst
index 018fa91d296..f52ee88b128 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/performance-faster-string-find.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/performance-faster-string-find.rst
@@ -4,12 +4,8 @@ performance-faster-string-find
==============================
Optimize calls to ``std::string::find()`` and friends when the needle passed is
-a single character string literal.
-The character literal overload is more efficient.
-
-By default only ``std::basic_string`` is considered. This list can be modified by
-passing a `;` separated list of class names using the `StringLikeClasses`
-option. The methods to consired are fixed, though.
+a single character string literal. The character literal overload is more
+efficient.
Examples:
@@ -20,3 +16,13 @@ Examples:
// becomes
str.find('A');
+
+Options
+-------
+
+.. option:: StringLikeClasses
+
+ Semicolon-separated list of names of string-like classes. By default only
+ ``std::basic_string`` is considered. The list of methods to consired is
+ fixed.
+
diff --git a/clang-tools-extra/docs/clang-tidy/checks/readability-simplify-boolean-expr.rst b/clang-tools-extra/docs/clang-tidy/checks/readability-simplify-boolean-expr.rst
index 7e1f6552cc6..b333e186d54 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/readability-simplify-boolean-expr.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/readability-simplify-boolean-expr.rst
@@ -3,7 +3,6 @@
readability-simplify-boolean-expr
=================================
-
Looks for boolean expressions involving boolean constants and simplifies
them to use the appropriate boolean expression directly.
@@ -73,9 +72,15 @@ Examples:
``struct X``, the conditional return ``if (x) return true; return false;``
becomes ``return static_cast<bool>(x);``
-When a conditional boolean return or assignment appears at the end of a
-chain of ``if``, ``else if`` statements, the conditional statement is left
-unchanged unless the option ``ChainedConditionalReturn`` or
-``ChainedConditionalAssignment``, respectively, is specified as non-zero.
-The default value for both options is zero.
+Options
+-------
+
+.. option:: ChainedConditionalReturn
+
+ If non-zero, conditional boolean return statements at the end of an
+ ``if/else if`` chain will be transformed. Default is `0`.
+
+.. option:: ChainedConditionalAssignment
+ If non-zero, conditional boolean assignments at the end of an ``if/else
+ if`` chain will be transformed. Default is `0`.
OpenPOWER on IntegriCloud