[all-commits] [llvm/llvm-project] 9c5018: [-Wunsafe-buffer-usage] Suppress warning for multi...

Malavika Samak via All-commits all-commits at lists.llvm.org
Wed Dec 11 23:58:01 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9c50182bf4942f88cc9876eb29e70802448cddc8
      https://github.com/llvm/llvm-project/commit/9c50182bf4942f88cc9876eb29e70802448cddc8
  Author: Malavika Samak <malavika.samak at gmail.com>
  Date:   2024-12-12 (Thu, 12 Dec 2024)

  Changed paths:
    M clang/lib/Analysis/UnsafeBufferUsage.cpp
    M clang/test/SemaCXX/warn-unsafe-buffer-usage-array.cpp
    M clang/test/SemaCXX/warn-unsafe-buffer-usage-field-attr.cpp
    M clang/test/SemaCXX/warn-unsafe-buffer-usage-fixits-parm-unsupported.cpp
    M clang/test/SemaCXX/warn-unsafe-buffer-usage.cpp

  Log Message:
  -----------
  [-Wunsafe-buffer-usage] Suppress warning for multi-dimensional constant arrays (#118249)

Do not warn about unsafe buffer access, when multi-dimensional constant
arrays are accessed and their indices are within the bounds of the
buffer. Warning in such cases would be a false positive. Such a
suppression already exists for 1-d
arrays and it is now extended to multi-dimensional arrays.

(rdar://137926311)
(rdar://140320139)

Co-authored-by: MalavikaSamak <malavika2 at apple.com>



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