[libcxx-commits] [PATCH] D147741: [libc++, std::vector] call the optimized version of __uninitialized_allocator_copy for trivial types

Aditya Kumar via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Apr 28 11:49:52 PDT 2023


hiraditya marked an inline comment as done.
hiraditya added inline comments.


================
Comment at: libcxx/include/__memory/uninitialized_algorithms.h:607
+  } else {
+    return std::copy(__first1, __last1, const_cast<_RawType*>(__first2));
+  }
----------------
philnik wrote:
> Mordante wrote:
> > hiraditya wrote:
> > > Mordante wrote:
> > > > LLVM style is not `else` after a `return`, here and other places in this patch. Note the `if constexpr` does get the `else` to avoid generating unneeded code by the compiler.
> > > This code is directly copied from the function above. Not sure what is the guidance for libcxx is, cc: @ldionne 
> > We have more code that does not conform to our policy, but for new code we use our policy.
> I'm not aware that we use this particular policy in our new code. Anyways, this code is redundant anyways, and shouldn't have to be added (unless I'm missing something).
it was indeed redundant. removed it.


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

https://reviews.llvm.org/D147741



More information about the libcxx-commits mailing list