Skip to content

Commit 415af01

Browse files
committedSep 21, 2015
Replace references to "transform" with references to "check" where neccessary in the documentation.
Summary: Replace references to "transform" with references to "check" where neccessary in the documentation. Reviewers: alexfh Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D13006 llvm-svn: 248153
1 parent 79b0ada commit 415af01

5 files changed

+36
-54
lines changed
 

‎clang-tools-extra/docs/clang-tidy/checks/modernize-loop-convert.rst

+10-10
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,19 @@ Original:
8181
v.push_back(2);
8282
v.push_back(3);
8383

84-
// safe transform
84+
// safe conversion
8585
for (int i = 0; i < N; ++i)
8686
cout << arr[i];
8787

88-
// reasonable transform
88+
// reasonable conversion
8989
for (vector<int>::iterator it = v.begin(); it != v.end(); ++it)
9090
cout << *it;*
9191

92-
// reasonable transform
92+
// reasonable conversion
9393
for (int i = 0; i < v.size(); ++i)
9494
cout << v[i];
9595

96-
After transformation with confidence level set to ``reasonable`` (default):
96+
After applying the check with minimum confidence level set to ``reasonable`` (default):
9797

9898
.. code-block:: c++
9999

@@ -104,15 +104,15 @@ After transformation with confidence level set to ``reasonable`` (default):
104104
v.push_back(2);
105105
v.push_back(3);
106106

107-
// safe transform
107+
// safe conversion
108108
for (auto & elem : arr)
109109
cout << elem;
110110

111-
// reasonable transform
111+
// reasonable conversion
112112
for (auto & elem : v)
113113
cout << elem;
114114

115-
// reasonable transform
115+
// reasonable conversion
116116
for (auto & elem : v)
117117
cout << elem;
118118

@@ -121,7 +121,7 @@ Limitations
121121

122122
There are certain situations where the tool may erroneously perform
123123
transformations that remove information and change semantics. Users of the tool
124-
should be aware of the behaviour and limitations of the transform outlined by
124+
should be aware of the behaviour and limitations of the check outlined by
125125
the cases below.
126126

127127
Comments inside loop headers
@@ -223,15 +223,15 @@ performed.
223223
Pointers and references to containers
224224
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
225225

226-
While most of the transform's risk analysis is dedicated to determining whether
226+
While most of the check's risk analysis is dedicated to determining whether
227227
the iterator or container was modified within the loop, it is possible to
228228
circumvent the analysis by accessing and modifying the container through a
229229
pointer or reference.
230230

231231
If the container were directly used instead of using the pointer or reference
232232
the following transformation would have only been applied at the ``risky``
233233
level since calling a member function of the container is considered `risky`.
234-
The transform cannot identify expressions associated with the container that are
234+
The check cannot identify expressions associated with the container that are
235235
different than the one used in the loop header, therefore the transformation
236236
below ends up being performed at the ``safe`` level.
237237

‎clang-tools-extra/docs/clang-tidy/checks/modernize-pass-by-value.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ modernize-pass-by-value
22
=======================
33

44
With move semantics added to the language and the standard library updated with
5-
move constructors added for many types it is now interesting to take an argument
6-
directly by value, instead of by const-reference, and then copy. This
7-
transformation allows the compiler to take care of choosing the best way to
8-
construct the copy.
5+
move constructors added for many types it is now interesting to take an
6+
argument directly by value, instead of by const-reference, and then copy. This
7+
check allows the compiler to take care of choosing the best way to construct
8+
the copy.
99

1010
The transformation is usually beneficial when the calling code passes an
1111
*rvalue* and assumes the move construction is a cheap operation. This short
@@ -34,7 +34,7 @@ Replaces the uses of const-references constructor parameters that are copied
3434
into class fields. The parameter is then moved with `std::move()`.
3535

3636
Since `std::move()` is a library function declared in `<utility>` it may be
37-
necessary to add this include. The transform will add the include directive when
37+
necessary to add this include. The check will add the include directive when
3838
necessary.
3939

4040
.. code-block:: c++

‎clang-tools-extra/docs/clang-tidy/checks/modernize-replace-auto-ptr.rst

+11-12
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,23 @@ Migration example:
2626
}
2727

2828
Since ``std::move()`` is a library function declared in ``<utility>`` it may be
29-
necessary to add this include. The transform will add the include directive when
29+
necessary to add this include. The check will add the include directive when
3030
necessary.
3131

3232
Known Limitations
3333
-----------------
3434
* If headers modification is not activated or if a header is not allowed to be
35-
changed this transform will produce broken code (compilation error), where the
36-
the headers' code will stay unchanged while the code using them will be
37-
changed.
38-
39-
* Client code that declares a reference to an ``std::auto_ptr`` coming from code
40-
that can't be migrated (such as a header coming from a 3\ :sup:`rd` party
41-
library) will produce a compilation error after migration. This is because the
42-
type of the reference will be changed to ``std::unique_ptr`` but the type
43-
returned by the library won't change, binding a reference to
35+
changed this check will produce broken code (compilation error), where the
36+
headers' code will stay unchanged while the code using them will be changed.
37+
38+
* Client code that declares a reference to an ``std::auto_ptr`` coming from
39+
code that can't be migrated (such as a header coming from a 3\ :sup:`rd`
40+
party library) will produce a compilation error after migration. This is
41+
because the type of the reference will be changed to ``std::unique_ptr`` but
42+
the type returned by the library won't change, binding a reference to
4443
``std::unique_ptr`` from an ``std::auto_ptr``. This pattern doesn't make much
45-
sense and usually ``std::auto_ptr`` are stored by value (otherwise what is the
46-
point in using them instead of a reference or a pointer?).
44+
sense and usually ``std::auto_ptr`` are stored by value (otherwise what is
45+
the point in using them instead of a reference or a pointer?).
4746

4847
.. code-block:: c++
4948

‎clang-tools-extra/docs/clang-tidy/checks/modernize-use-auto.rst

+9-26
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
modernize-use-auto
22
==================
33

4-
This check is responsible for using the ``auto`` type specifier for
5-
variable declarations to *improve code readability and maintainability*.
6-
For example:
4+
This check is responsible for using the ``auto`` type specifier for variable
5+
declarations to *improve code readability and maintainability*. For example:
76

87
.. code-block:: c++
98

@@ -38,7 +37,7 @@ Iterators
3837

3938
Iterator type specifiers tend to be long and used frequently, especially in
4039
loop constructs. Since the functions generating iterators have a common format,
41-
the type specifier can be replaced without obscuring the meaning of code while
40+
the type specifier can be replaced without obscuring the meaning of code while
4241
improving readability and maintainability.
4342

4443
.. code-block:: c++
@@ -53,50 +52,33 @@ improving readability and maintainability.
5352
for (auto I = my_container.begin(), E = my_container.end(); I != E; ++I) {
5453
}
5554

56-
The transform will only replace iterator type-specifiers when all of the
57-
following conditions are satisfied:
55+
The check will only replace iterator type-specifiers when all of the following
56+
conditions are satisfied:
57+
5858
* The iterator is for one of the standard container in ``std`` namespace:
5959

6060
* ``array``
61-
6261
* ``deque``
63-
6462
* ``forward_list``
65-
6663
* ``list``
67-
6864
* ``vector``
69-
7065
* ``map``
71-
7266
* ``multimap``
73-
7467
* ``set``
75-
7668
* ``multiset``
77-
7869
* ``unordered_map``
79-
8070
* ``unordered_multimap``
81-
8271
* ``unordered_set``
83-
8472
* ``unordered_multiset``
85-
8673
* ``queue``
87-
8874
* ``priority_queue``
89-
9075
* ``stack``
9176

9277
* The iterator is one of the possible iterator types for standard containers:
9378

9479
* ``iterator``
95-
9680
* ``reverse_iterator``
97-
9881
* ``const_iterator``
99-
10082
* ``const_reverse_iterator``
10183

10284
* In addition to using iterator types directly, typedefs or other ways of
@@ -128,7 +110,8 @@ following conditions are satisfied:
128110

129111
Known Limitations
130112
-----------------
131-
* If the initializer is an explicit conversion constructor, the transform will
132-
not replace the type specifier even though it would be safe to do so.
113+
* If the initializer is an explicit conversion constructor, the check will not
114+
replace the type specifier even though it would be safe to do so.
115+
133116
* User-defined iterators are not handled at this time.
134117

‎clang-tools-extra/docs/clang-tidy/checks/modernize-use-nullptr.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ transforms to:
3838
User defined macros
3939
-------------------
4040

41-
By default this transform will only replace the ``NULL`` macro and will skip any
41+
By default this check will only replace the ``NULL`` macro and will skip any
4242
user-defined macros that behaves like ``NULL``. The user can use the
4343
:option:``UserNullMacros`` option to specify a comma-separated list of macro
4444
names that will be transformed along with ``NULL``.

0 commit comments

Comments
 (0)
Please sign in to comment.