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:
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
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:
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
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.