[PATCH] D139233: [-Wunsafe-buffer-usage] Add an unsafe gadget for pointer-arithmetic operations
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 8 18:21:19 PST 2022
NoQ added inline comments.
================
Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:374-375
+ : UnsafeGadget(Kind::PointerArithmetic),
+ PA(Result.Nodes.getNodeAs<BinaryOperator>("ptrAdd")),
+ Ptr(Result.Nodes.getNodeAs<Expr>("ptrAddPtr")) {}
+
----------------
Let's unhardcode the bind tags just like in the subscript patch?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139233/new/
https://reviews.llvm.org/D139233
More information about the cfe-commits
mailing list