[all-commits] [llvm/llvm-project] 36e7b8: ADT: Reduce nesting in resize_for_overwrite(), NFC

Duncan P. N. Exon Smith via All-commits all-commits at lists.llvm.org
Wed Dec 8 12:52:05 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 36e7b8dd564b383d9b4ca38674dbed6337e642b3
      https://github.com/llvm/llvm-project/commit/36e7b8dd564b383d9b4ca38674dbed6337e642b3
  Author: Duncan P. N. Exon Smith <dexonsmith at apple.com>
  Date:   2021-12-08 (Wed, 08 Dec 2021)

  Changed paths:
    M llvm/include/llvm/ADT/SmallVector.h

  Log Message:
  -----------
  ADT: Reduce nesting in resize_for_overwrite(), NFC

Use an early return in SmallVectorImpl::resize_for_overwite() to reduce
nesting. This also makes it easier to visually compare against the
two-argument version of resize().




More information about the All-commits mailing list