[all-commits] [llvm/llvm-project] ebf25d: [-Wunsafe-buffer-usage] Reduce false positives wit...

Ziqing Luo via All-commits all-commits at lists.llvm.org
Fri Sep 13 13:47:28 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ebf25d9509d19a381d94a0383135ee37f5b7b6e2
      https://github.com/llvm/llvm-project/commit/ebf25d9509d19a381d94a0383135ee37f5b7b6e2
  Author: Ziqing Luo <ziqing at udel.edu>
  Date:   2024-09-13 (Fri, 13 Sep 2024)

  Changed paths:
    M clang/lib/Analysis/UnsafeBufferUsage.cpp
    M clang/test/SemaCXX/warn-unsafe-buffer-usage-libc-functions.cpp

  Log Message:
  -----------
  [-Wunsafe-buffer-usage] Reduce false positives with constant arrays in libc warnings (#108308)

For `snprintf(a, sizeof a, ...)`, the first two arguments form a safe
pattern if `a` is a constant array. In such a case, this commit will
suppress the warning.

(rdar://117182250)



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