[libcxx-commits] [PATCH] D119628: [libc++] Don't return alloc_size - 1 in __recommend to add 1 when allocating

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Feb 23 09:14:49 PST 2022


philnik added inline comments.


================
Comment at: libcxx/include/string:1541
+            return static_cast<size_type>(__min_cap);
+        size_type __guess = __align_it<sizeof(value_type) <__alignment ? __alignment / sizeof(value_type) : 1> (__s + 1);
+        if (__guess == __min_cap + 1)
----------------
Quuxplusone wrote:
> Clang-format strikes again. (If you must clang-format, please remember to sanity-check the code when it's finished.)
That wasn't clang-format, but hey.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119628/new/

https://reviews.llvm.org/D119628



More information about the libcxx-commits mailing list