[clang] [Clang] Clarify diagnostic notes for implicitly generated deduction guides (PR #96084)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 20 04:59:06 PDT 2024
Sirraide wrote:
> I don't think this would exacerbate it much because this 1) only notes implicitly generated CTAD guides; 2) won't be chatty if the guide is generated over a user-defined constructor: we have already pointed to a feasible source location that makes things clear.
Hmm, yeah, I guess it’s not that bad so long as we don’t end up w/ e.g. 20 extra notes because of this.
> Thanks for suggesting a better approach. However, doing so would require big surgery in our diagnostic building logic for overloads. We don't explain the reason for deduction failure in an error; instead, we do so in the following notes. To be clear, we now have ~16 deduction failure kinds, each with its own diagnostic message. Given that, I don't think it's necessary (and probably undoable) to special case the CTAD guides for each note...
> It's also sad that we're unable to pretty-print the deduction guides in a diagnostic. If I read it correctly, we currently only support printing either1) a verbatim code snippet or 2) a FIXIT suggestion. And neither does work for this case, though.
Yeah, I’ve been wanting to try and take a look at some of that, but other things have been getting in the way unfortunately...
https://github.com/llvm/llvm-project/pull/96084
More information about the cfe-commits
mailing list