[clang] [clang] print correct context for diagnostics suppressed by deduction (PR #125453)

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 2 23:36:25 PST 2025


zygoloid 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?

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.

https://github.com/llvm/llvm-project/pull/125453


More information about the cfe-commits mailing list