[PATCH] D154880: [-Wunsafe-buffer-usage][WIP] Add a facility for debugging low fixit coverage.
Ziqing Luo via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 25 13:01:25 PDT 2023
ziqingluo-90 added a comment.
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?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154880/new/
https://reviews.llvm.org/D154880
More information about the cfe-commits
mailing list