[all-commits] [llvm/llvm-project] f84f17: [-Wunsafe-buffer-usage] Add an unsafe gadget for p...

Ziqing Luo via All-commits all-commits at lists.llvm.org
Wed Jan 4 17:02:12 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f84f17c489f7cb84d72e84a6b1b6c54bd8d52717
      https://github.com/llvm/llvm-project/commit/f84f17c489f7cb84d72e84a6b1b6c54bd8d52717
  Author: Ziqing Luo <ziqing at udel.edu>
  Date:   2023-01-04 (Wed, 04 Jan 2023)

  Changed paths:
    M clang/include/clang/Analysis/Analyses/UnsafeBufferUsageGadgets.def
    M clang/lib/Analysis/UnsafeBufferUsage.cpp
    M clang/test/SemaCXX/warn-unsafe-buffer-usage.cpp

  Log Message:
  -----------
  [-Wunsafe-buffer-usage] Add an unsafe gadget for pointer-arithmetic operations

For -Wunsafe-buffer-usage diagnostics, we want to warn about pointer
arithmetics since resulting pointers can be used to access buffers.
Therefore, I add an `UnsafeGadget` representing general pointer
arithmetic operations.

Reviewed by: NoQ
Differential revision: https://reviews.llvm.org/D139233




More information about the All-commits mailing list