[all-commits] [llvm/llvm-project] f6c54c: [-Wunsafe-buffer-usage] Ignore array subscript on ...
Ziqing Luo via All-commits
all-commits at lists.llvm.org
Fri Dec 16 21:05:02 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f6c54cdbc4394cd32f0dde990f217ca8f534a136
https://github.com/llvm/llvm-project/commit/f6c54cdbc4394cd32f0dde990f217ca8f534a136
Author: ziqingluo-90 <ziqing at udel.edu>
Date: 2022-12-16 (Fri, 16 Dec 2022)
Changed paths:
M clang/lib/Analysis/UnsafeBufferUsage.cpp
M clang/test/SemaCXX/warn-unsafe-buffer-usage.cpp
Log Message:
-----------
[-Wunsafe-buffer-usage] Ignore array subscript on literal zero
Unsafe Buffer Usage analysis only warns unsafe buffer accesses but not
pointer dereferences. An array subscript on a literal zero is
equivalent to dereference a pointer thus we do not want to warn it.
Reviewed By: NoQ
Differential Revision: https://reviews.llvm.org/D138321
More information about the All-commits
mailing list