[PATCH] D157441: [-Wunsafe-buffer-usage] Use `Strategy` to determine whether to fix a parameter

Ziqing Luo via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 9 18:55:35 PDT 2023


ziqingluo-90 added a comment.

>> Extend PointerAssignmentGadget and PointerInitGadget to generate fix-its for cases where the left-hand side 
>> has won't fix strategy and the right-hand side has std::span strategy.
>
> Hmm, is this intertwined with other changes, or is this completely separate? Also my head appears to be blank;

The two `FixableGadget`s previously gave incorrect fix-its for the cases where only RHS need fix.  After the change made to `Strategy`, they returned `std::nullopt` as the case was not implemented.
So to avoid regression, I made the extension to the two Gadgets.

> did we reach any conclusion about the nature of "single" RHS-es and usefulness of annotating them as such?
> Which could be an approach that would encourage people to propagate more bounds in the backwards direction by default.

Can you elaborate the question a bit more?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157441/new/

https://reviews.llvm.org/D157441



More information about the cfe-commits mailing list