[ADT] Add drop_end.
authorMarek Kurdej <marek.kurdej+llvm.org@gmail.com>
Fri, 18 Mar 2022 13:18:37 +0000 (14:18 +0100)
committerMarek Kurdej <marek.kurdej+llvm.org@gmail.com>
Mon, 21 Mar 2022 08:43:19 +0000 (09:43 +0100)
commitdf4da5f37de30b0dc03b0f790b2100ccce410d08
treef95b3fe189437a44deb2e6eaa6f4d4d4057121f0
parente725e2afe02e18398525652c9bceda1eb055ea64
[ADT] Add drop_end.

This patch adds drop_end that is analogical to drop_begin.
It tries to fill the functional gap where one could drop first elements but not the last ones.
The need for it came in when refactoring clang-format.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D122009
llvm/include/llvm/ADT/STLExtras.h
llvm/unittests/ADT/STLExtrasTest.cpp