[clang] [Sema] Fast-path simple plain auto deduction in DeduceAutoType (PR #188196)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 25 08:09:49 PDT 2026
Sirraide wrote:
> So I’m still a bit worried that we will inadvertently run into _some_ case where we have a weird type for which this process succeeds but silently yields the wrong type...
>
> This might be a bit messy, but would it be possible to, in _debug mode_ only, always run _both_ the fast path and template deduction and assert that if the former succeeds, it yields the same type as the latter? The fast path is, well, fast, so that shouldn’t slow down debug mode too much, and also it’s debug mode so we probably don’t care.
Because whenever we do these sorts of optimisations that deviate from how the standard describes that things should happen, we need to make sure that what we’re doing is _actually_ semantically equivalent.
https://github.com/llvm/llvm-project/pull/188196
More information about the cfe-commits
mailing list