summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang-tools-extra/docs/clang-tidy/checks/misc-forwarding-reference-overload.rst14
-rw-r--r--clang-tools-extra/docs/clang-tidy/checks/performance-inefficient-vector-operation.rst4
2 files changed, 9 insertions, 9 deletions
diff --git a/clang-tools-extra/docs/clang-tidy/checks/misc-forwarding-reference-overload.rst b/clang-tools-extra/docs/clang-tidy/checks/misc-forwarding-reference-overload.rst
index 434c6819ca9..1682a5fb982 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/misc-forwarding-reference-overload.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/misc-forwarding-reference-overload.rst
@@ -4,7 +4,7 @@ misc-forwarding-reference-overload
==================================
The check looks for perfect forwarding constructors that can hide copy or move
-constructors. If a non const lvalue reference is passed to the constructor, the
+constructors. If a non const lvalue reference is passed to the constructor, the
forwarding reference parameter will be a better match than the const reference
parameter of the copy constructor, so the perfect forwarding constructor will be
called, which can be confusing.
@@ -14,7 +14,7 @@ Item 26.
Consider the following example:
.. code-block:: c++
-
+
class Person {
public:
// C1: perfect forwarding ctor
@@ -24,15 +24,15 @@ Consider the following example:
// C2: perfect forwarding ctor with parameter default value
template<typename T>
explicit Person(T&& n, int x = 1) {}
-
+
// C3: perfect forwarding ctor guarded with enable_if
template<typename T, typename X = enable_if_t<is_special<T>,void>>
explicit Person(T&& n) {}
-
+
// (possibly compiler generated) copy ctor
- Person(const Person& rhs);
+ Person(const Person& rhs);
};
-
+
The check warns for constructors C1 and C2, because those can hide copy and move
constructors. We suppress warnings if the copy and the move constructors are both
disabled (deleted or private), because there is nothing the perfect forwarding
@@ -44,6 +44,6 @@ Background
----------
For deciding whether a constructor is guarded with enable_if, we consider the
-default values of the type parameters and the types of the contructor
+default values of the type parameters and the types of the constructor
parameters. If any part of these types is std::enable_if or std::enable_if_t, we
assume the constructor is guarded.
diff --git a/clang-tools-extra/docs/clang-tidy/checks/performance-inefficient-vector-operation.rst b/clang-tools-extra/docs/clang-tidy/checks/performance-inefficient-vector-operation.rst
index d6288b9f023..8cf9318fd7b 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/performance-inefficient-vector-operation.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/performance-inefficient-vector-operation.rst
@@ -18,7 +18,7 @@ statement body:
v.push_back(n);
// This will trigger the warning since the push_back may cause multiple
// memory reallocations in v. This can be avoid by inserting a 'reserve(n)'
- // statment before the for statment.
+ // statement before the for statement.
}
@@ -36,7 +36,7 @@ statement body:
v.push_back(element);
// This will trigger the warning since the 'push_back' may cause multiple
// memory reallocations in v. This can be avoid by inserting a
- // 'reserve(data.size())' statment before the for statment.
+ // 'reserve(data.size())' statement before the for statement.
}
OpenPOWER on IntegriCloud