Skip to content

Commit b368404

Browse files
authored
[libc++][NFC] Fix typo in count_new.h (#102049)
A function was named alocate_aligned_impl, when it should have been named allocate_aligned_impl.
1 parent 6b7afaa commit b368404

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libcxx/test/support/count_new.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ void operator delete[](void* p, std::nothrow_t const&) TEST_NOEXCEPT {
455455
# define USE_ALIGNED_ALLOC
456456
# endif
457457

458-
inline void* alocate_aligned_impl(std::size_t size, std::align_val_t align) {
458+
inline void* allocate_aligned_impl(std::size_t size, std::align_val_t align) {
459459
const std::size_t alignment = static_cast<std::size_t>(align);
460460
void* ret = nullptr;
461461
# ifdef USE_ALIGNED_ALLOC
@@ -479,7 +479,7 @@ inline void free_aligned_impl(void* ptr, std::align_val_t) {
479479
// operator new(size_t, align_val_t[, nothrow_t]) and operator delete(size_t, align_val_t[, nothrow_t])
480480
void* operator new(std::size_t s, std::align_val_t av) TEST_THROW_SPEC(std::bad_alloc) {
481481
getGlobalMemCounter()->alignedNewCalled(s, static_cast<std::size_t>(av));
482-
void* p = alocate_aligned_impl(s, av);
482+
void* p = allocate_aligned_impl(s, av);
483483
if (p == nullptr)
484484
detail::throw_bad_alloc_helper();
485485
return p;
@@ -495,7 +495,7 @@ void* operator new(std::size_t s, std::align_val_t av, std::nothrow_t const&) TE
495495
return nullptr;
496496
}
497497
# endif
498-
return alocate_aligned_impl(s, av);
498+
return allocate_aligned_impl(s, av);
499499
}
500500

501501
void operator delete(void* p, std::align_val_t av) TEST_NOEXCEPT {
@@ -511,7 +511,7 @@ void operator delete(void* p, std::align_val_t av, std::nothrow_t const&) TEST_N
511511
// operator new[](size_t, align_val_t[, nothrow_t]) and operator delete[](size_t, align_val_t[, nothrow_t])
512512
void* operator new[](std::size_t s, std::align_val_t av) TEST_THROW_SPEC(std::bad_alloc) {
513513
getGlobalMemCounter()->alignedNewArrayCalled(s, static_cast<std::size_t>(av));
514-
void* p = alocate_aligned_impl(s, av);
514+
void* p = allocate_aligned_impl(s, av);
515515
if (p == nullptr)
516516
detail::throw_bad_alloc_helper();
517517
return p;
@@ -527,7 +527,7 @@ void* operator new[](std::size_t s, std::align_val_t av, std::nothrow_t const&)
527527
return nullptr;
528528
}
529529
# endif
530-
return alocate_aligned_impl(s, av);
530+
return allocate_aligned_impl(s, av);
531531
}
532532

533533
void operator delete[](void* p, std::align_val_t av) TEST_NOEXCEPT {

0 commit comments

Comments
 (0)