[all-commits] [llvm/llvm-project] cd2652: [-Wunsafe-buffer-usage] Fixits for assignments to ...

Ziqing Luo via All-commits all-commits at lists.llvm.org
Thu Feb 23 15:03:07 PST 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cd2652963b6b97c01329419f15c336e5560afa98
  Author: Ziqing Luo <ziqing at udel.edu>
  Date:   2023-02-23 (Thu, 23 Feb 2023)

  Changed paths:
    M clang/lib/Analysis/UnsafeBufferUsage.cpp
    A clang/test/SemaCXX/warn-unsafe-buffer-usage-fixits-assign-to-array-subscr-on-ptr.cpp

  Log Message:
  [-Wunsafe-buffer-usage] Fixits for assignments to array subscript expressions

Let generate fix-its to make assignments' left-hand side of the form
`dre[e]` safe if `e` is known to be non-negative.

Commit on behalf of jkorous (Jan Korous)

Reviewed by: NoQ (Artem Dergachev)

Differential revision: https://reviews.llvm.org/D142794

More information about the All-commits mailing list