Clean-up solver state management for a constraint system.

Make SolverState manage whether the ConstraintSystem it belongs to has a
current SolverState.

Also a couple minor formatting fixes for ternary expressions involving
solverState.
This commit is contained in:
Mark Lacey
2016-11-15 16:45:48 -08:00
parent 07737314da
commit a4a6c0d5e0
5 changed files with 11 additions and 15 deletions

View File

@@ -4039,7 +4039,7 @@ bool ConstraintSystem::recordFix(Fix fix, ConstraintLocatorBuilder locator) {
auto &ctx = getASTContext();
if (ctx.LangOpts.DebugConstraintSolver) {
auto &log = ctx.TypeCheckerDebug->getStream();
log.indent(solverState? solverState->depth * 2 + 2 : 0)
log.indent(solverState ? solverState->depth * 2 + 2 : 0)
<< "(attempting fix ";
fix.print(log, this);
log << " @";