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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to