[PATCH] D154880: [-Wunsafe-buffer-usage] Add a facility for debugging low fixit coverage.
Rashmi Mudduluru via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 26 14:11:00 PDT 2023
t-rasmud added a comment.
In D154880#4533035 <https://reviews.llvm.org/D154880#4533035>, @ziqingluo-90 wrote:
> This is a lot of work, thank you @t-rasmud & @NoQ !
>
> I have a minor suggestion: can we use some macros to make the debug stub even shorter?
> The prefix `"failed to produce fixit for declaration"` is used in many places so probably we do not have to repeat it everywhere. And, maybe some prefixes could be a bit more blurry so that they can be shared. For example, we can just replace `"failed to produce fixit for parm var decl"` with `"failed to produce fixit for declaration"`. We have source location and more specific message attached to the note so we are not losing information I think.
>
> I'm imagining something like this:
>
> #define DEBUG_NOTE_DECL_FAIL(D, Msg) \
> Handler.addDebugNoteForVar((D), (D)->getBeginLoc(), "failed to produce fixit for declaration "##Msg)
>
> #define DEBUG_NOTE_GADGET_FAIL(Gadget, Msg) ...
>
> Does it make sense to you?
I like this suggestion. I've made changes to replace `Handler.addDebugNoteForVar` for declarations. The Gadget case appears just once as of now, so I've left it as is.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154880/new/
https://reviews.llvm.org/D154880
More information about the cfe-commits
mailing list