swift
a6470240 - Sema: Fix source location bookkeeping for 'reasonable time' diagnostic

Commit
233 days ago
Sema: Fix source location bookkeeping for 'reasonable time' diagnostic We already had bookkeeping to track which statement in a multi-statement closure we were looking at, but this was only used for the 'reasonable time' diagnostic in the case that we hit the expression timer, which was almost never hit, and is now off by default. The scope, memory, and trial limits couldn't use this information, so they would always diagnose the entire target being type checked. Move it up from ExpressionTimer to ConstraintSystem, so that we get the right source location there too. Also, factor out some code duplication in BuilderTransform to ensure we get the same benefit for result builders applied to function bodies too.
Author
Committer
Parents
Loading