[PATCH] D139233: [-Wunsafe-buffer-usage] Add an unsafe gadget for pointer-arithmetic operations

2023-01-04 Thread Ziqing Luo via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGf84f17c489f7: [-Wunsafe-buffer-usage] Add an unsafe gadget for pointer-arithmetic operations (authored by ziqingluo-90). Changed prior to commit:

[PATCH] D139233: [-Wunsafe-buffer-usage] Add an unsafe gadget for pointer-arithmetic operations

2023-01-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. LGTM! Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:383 + // FIXME: pointer adding zero should be fine + //FIXME: this gadge will need a fix-it +}; It's

[PATCH] D139233: [-Wunsafe-buffer-usage] Add an unsafe gadget for pointer-arithmetic operations

2022-12-19 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 updated this revision to Diff 484138. ziqingluo-90 added a comment. Did a rebase and addressed the comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139233/new/ https://reviews.llvm.org/D139233 Files:

[PATCH] D139233: [-Wunsafe-buffer-usage] Add an unsafe gadget for pointer-arithmetic operations

2022-12-08 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:374-375 + : UnsafeGadget(Kind::PointerArithmetic), +PA(Result.Nodes.getNodeAs("ptrAdd")), +Ptr(Result.Nodes.getNodeAs("ptrAddPtr")) {} + Let's unhardcode the

[PATCH] D139233: [-Wunsafe-buffer-usage] Add an unsafe gadget for pointer-arithmetic operations

2022-12-02 Thread Ziqing Luo via Phabricator via cfe-commits
ziqingluo-90 created this revision. ziqingluo-90 added reviewers: aaron.ballman, xazax.hun, steakhal, gribozavr, jkorous, NoQ, malavikasamak, t-rasmud. Herald added a subscriber: rnkovacs. Herald added a project: All. ziqingluo-90 requested review of this revision. Herald added a project: clang.