[clang] [clang] print correct context for diagnostics suppressed by deduction (PR #125453)
Matheus Izvekov via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 3 17:41:29 PST 2025
mizvekov wrote:
> Thank you for tackling this longstanding issue! How much does saving this extra state add to the runtime and memory usage on a template-heavy compilation?
I tried building stdexec, the difference is within the noise.
Do you have any other examples of template-heavy code in mind?
> If the cost is concerning, one other option we could consider here would be performing pending local instantiations eagerly when we reach the end of a region in which we have a context note -- that'd mean we don't need to save state for later. That's subtly behavior changing because it will pick an earlier point of instantiation for those local instantiations, but it's a permitted point of instantiation; we could try it and see if it works well enough in practice. We could also delay implicit definitions of special members like we do for template instantiations to reduce the impact.
Sounds worth a try, if we can find any concerns.
https://github.com/llvm/llvm-project/pull/125453
More information about the cfe-commits
mailing list