Update determination of "too complex" expression to take time into account.

By default, end expression type checking after the elapsed process time
is more than 60 seconds for the current expression. This threshold can
be overridden by using -solver-expression-time-threshold=<seconds>.

Resolves rdar://problem/32859654
This commit is contained in:
Mark Lacey
2017-06-21 15:32:38 -07:00
parent 05e79e6b02
commit e51e3e4bd4
11 changed files with 80 additions and 14 deletions

View File

@@ -519,7 +519,8 @@ void CompilerInstance::performSema() {
performTypeChecking(MainFile, PersistentState.getTopLevelContext(),
TypeCheckOptions, CurTUElem,
options.WarnLongFunctionBodies,
options.WarnLongExpressionTypeChecking);
options.WarnLongExpressionTypeChecking,
options.SolverExpressionTimeThreshold);
}
CurTUElem = MainFile.Decls.size();
} while (!Done);