[all-commits] [llvm/llvm-project] eb6195: [ObjC][CodeGen] Assume a for-in loop is in bounds ...

AtariDreams via All-commits all-commits at lists.llvm.org
Thu Jul 11 02:21:36 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: eb61956d1a039d9cb03e0d041f33ab2ecc80519e
      https://github.com/llvm/llvm-project/commit/eb61956d1a039d9cb03e0d041f33ab2ecc80519e
  Author: AtariDreams <gfunni234 at gmail.com>
  Date:   2024-07-11 (Thu, 11 Jul 2024)

  Changed paths:
    M clang/lib/CodeGen/CGObjC.cpp
    M clang/test/CodeGenObjC/arc-foreach.m

  Log Message:
  -----------
  [ObjC][CodeGen] Assume a for-in loop is in bounds and cannot overflow (#94885)

When accessing data in the buffer, we know we won't overrun the buffer,
so we know it is inbounds. In addition, we know that the addition to
increase the index is also NUW because the buffer's end has to be
unsigned-greater-than 0, which becomes untrue if the bounds ever has an
unsigned wrap.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list