No. If `dti->findTempDecl(sc)` returns true, `dti->ti->tempdecl` will be set surely.
I agree that to integrate repeated logic patterns would be necessary, but these code will be modified in the near future for implementing other features. It's still early.