[all-commits] [llvm/llvm-project] 692da6: [-Wunsafe-buffer-usage] Filter out conflicting fix...

Ziqing Luo via All-commits all-commits at lists.llvm.org
Tue Feb 7 16:15:55 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 692da6245d719fcee9d55936a021d9f9e301c557
      https://github.com/llvm/llvm-project/commit/692da6245d719fcee9d55936a021d9f9e301c557
  Author: Ziqing Luo <ziqing at udel.edu>
  Date:   2023-02-07 (Tue, 07 Feb 2023)

  Changed paths:
    M clang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h
    M clang/lib/Analysis/UnsafeBufferUsage.cpp
    M clang/unittests/Analysis/CMakeLists.txt
    A clang/unittests/Analysis/UnsafeBufferUsageTest.cpp

  Log Message:
  -----------
  [-Wunsafe-buffer-usage] Filter out conflicting fix-its

Two fix-its conflict if they have overlapping source ranges. We shall
not emit conflicting fix-its.  This patch checks conflicts in fix-its
generated for one variable (including variable declaration fix-its and
variable usage fix-its). If there is any, we do NOT emit any fix-it
for that variable.

Reviewed by: NoQ

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




More information about the All-commits mailing list