[llvm-branch-commits] [libcxx] b6f1917 - [libc++] Fix some one-off typos in comments. NFCI.
Arthur O'Dwyer via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Dec 14 07:01:30 PST 2020
Author: Arthur O'Dwyer
Date: 2020-12-14T09:54:58-05:00
New Revision: b6f191741562ab32a3e210c8661df09b546275cc
URL: https://github.com/llvm/llvm-project/commit/b6f191741562ab32a3e210c8661df09b546275cc
DIFF: https://github.com/llvm/llvm-project/commit/b6f191741562ab32a3e210c8661df09b546275cc.diff
LOG: [libc++] Fix some one-off typos in comments. NFCI.
Added:
Modified:
libcxx/include/__hash_table
libcxx/include/__tree
libcxx/include/algorithm
libcxx/include/list
libcxx/include/optional
libcxx/include/semaphore
Removed:
################################################################################
diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table
index ab45277e20c8..521ebbf2c45f 100644
--- a/libcxx/include/__hash_table
+++ b/libcxx/include/__hash_table
@@ -1929,7 +1929,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_unique(__node_pointer __
// Prepare the container for an insertion of the value __cp_val with the hash
// __cp_hash. This does a lookup into the container to see if __cp_value is
// already present, and performs a rehash if necessary. Returns a pointer to the
-// last occurance of __cp_val in the map.
+// last occurrence of __cp_val in the map.
//
// Note that this function does forward exceptions if key_eq() throws, and never
// mutates __value or actually inserts into the map.
diff --git a/libcxx/include/__tree b/libcxx/include/__tree
index 26c4c4121c5f..d1bfccfb5909 100644
--- a/libcxx/include/__tree
+++ b/libcxx/include/__tree
@@ -1428,7 +1428,7 @@ private:
__node_base_pointer&
__find_leaf(const_iterator __hint,
__parent_pointer& __parent, const key_type& __v);
- // FIXME: Make this function const qualified. Unfortunetly doing so
+ // FIXME: Make this function const qualified. Unfortunately doing so
// breaks existing code which uses non-const callable comparators.
template <class _Key>
__node_base_pointer&
diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm
index bba8f3ac5199..b1771a1c629b 100644
--- a/libcxx/include/algorithm
+++ b/libcxx/include/algorithm
@@ -4056,7 +4056,7 @@ __sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __c
++__i;
}
// [__first, __i) == *__first and *__first < [__i, __last)
- // The first part is sorted, sort the secod part
+ // The first part is sorted, sort the second part
// _VSTD::__sort<_Compare>(__i, __last, __comp);
__first = __i;
goto __restart;
@@ -4564,7 +4564,7 @@ __inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle,
// swap middle two partitions
__middle = _VSTD::rotate(__m1, __middle, __m2);
// __len12 and __len21 now have swapped meanings
- // merge smaller range with recurisve call and larger with tail recursion elimination
+ // merge smaller range with recursive call and larger with tail recursion elimination
if (__len11 + __len21 < __len12 + __len22)
{
_VSTD::__inplace_merge<_Compare>(__first, __m1, __middle, __comp, __len11, __len21, __buff, __buff_size);
diff --git a/libcxx/include/list b/libcxx/include/list
index a71f46fa2527..a18514d74eaf 100644
--- a/libcxx/include/list
+++ b/libcxx/include/list
@@ -2056,7 +2056,7 @@ list<_Tp, _Alloc>::splice(const_iterator __p, list& __c, const_iterator __i)
" referring to list argument");
_LIBCPP_ASSERT(__get_const_db()->__dereferenceable(&__i),
"list::splice(iterator, list, iterator) called with second iterator not"
- " derefereceable");
+ " dereferenceable");
#endif
if (__p.__ptr_ != __i.__ptr_ && __p.__ptr_ != __i.__ptr_->__next_)
{
diff --git a/libcxx/include/optional b/libcxx/include/optional
index 6cd51482e926..570fa11e78c4 100644
--- a/libcxx/include/optional
+++ b/libcxx/include/optional
@@ -657,7 +657,7 @@ private:
}
template <class _Up, class _QUp = _QualUp>
static constexpr bool __enable_assign() {
- // Construction and assignability of _Qup to _Tp has already been
+ // Construction and assignability of _QUp to _Tp has already been
// checked.
return !__check_constructible_from_opt<_Up>::value &&
!__check_assignable_from_opt<_Up>::value;
diff --git a/libcxx/include/semaphore b/libcxx/include/semaphore
index 0943606e93d2..0e0434f7fbd5 100644
--- a/libcxx/include/semaphore
+++ b/libcxx/include/semaphore
@@ -71,7 +71,7 @@ __atomic_semaphore_base is the general-case implementation, to be used for
user-requested least-max values that exceed the OS implementation support
(incl. when the OS has no support of its own) and for binary semaphores.
-It is a typical Dijsktra semaphore algorithm over atomics, wait and notify
+It is a typical Dijkstra semaphore algorithm over atomics, wait and notify
functions. It avoids contention against users' own use of those facilities.
*/
More information about the llvm-branch-commits
mailing list