[clang] [Sema] Fast-path simple plain auto deduction in DeduceAutoType (PR #188196)

via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 2 04:40:30 PDT 2026


heturing wrote:

> > 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.
> 
> Also I think @Sirraide is requesting for debug-mode-only assertions but not assertions that may also apply to release mode build. Note that people build release clang with assertion enabled to catch bugs in production so running type deduction two times for them doesn't look like a good idea.

That makes sense. I'd prefer @Sirraide's recommendation over adding a new macro.

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


More information about the cfe-commits mailing list