[all-commits] [llvm/llvm-project] 0dcb0a: [-Wunsafe-buffer-usage] Fix false positives in war...

Malavika Samak via All-commits all-commits at lists.llvm.org
Wed Nov 13 13:09:15 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0dcb0acf8265e1486f4f3715cef01987af1391cd
      https://github.com/llvm/llvm-project/commit/0dcb0acf8265e1486f4f3715cef01987af1391cd
  Author: Malavika Samak <malavika.samak at gmail.com>
  Date:   2024-11-13 (Wed, 13 Nov 2024)

  Changed paths:
    M clang/lib/Analysis/UnsafeBufferUsage.cpp
    M clang/test/SemaCXX/warn-unsafe-buffer-usage-in-container-span-construct.cpp

  Log Message:
  -----------
  [-Wunsafe-buffer-usage] Fix false positives in warning againt 2-parameter std::span constructor (#115797)

Do not warn when two parameter constructor receives pointer address from
a std::addressof method and the span size is set to 1.

(rdar://139298119)

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