[clang-tools-extra] r306750 - Fix some typos in the doc

Sylvestre Ledru via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 29 15:26:06 PDT 2017


Author: sylvestre
Date: Thu Jun 29 15:26:06 2017
New Revision: 306750

URL: http://llvm.org/viewvc/llvm-project?rev=306750&view=rev
Log:
Fix some typos in the doc

Modified:
    clang-tools-extra/trunk/docs/clang-tidy/checks/misc-forwarding-reference-overload.rst
    clang-tools-extra/trunk/docs/clang-tidy/checks/performance-inefficient-vector-operation.rst

Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/misc-forwarding-reference-overload.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/misc-forwarding-reference-overload.rst?rev=306750&r1=306749&r2=306750&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/misc-forwarding-reference-overload.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/misc-forwarding-reference-overload.rst Thu Jun 29 15:26:06 2017
@@ -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.

Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/performance-inefficient-vector-operation.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/performance-inefficient-vector-operation.rst?rev=306750&r1=306749&r2=306750&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/performance-inefficient-vector-operation.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/performance-inefficient-vector-operation.rst Thu Jun 29 15:26:06 2017
@@ -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.
   }
 
 




More information about the cfe-commits mailing list