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

@@ -1449,7 +1449,7 @@ void ConstraintSystem::resolveOverload(ConstraintLocator *locator,
refType};
if (TC.getLangOpts().DebugConstraintSolver) {
auto &log = getASTContext().TypeCheckerDebug->getStream();
log.indent(solverState? solverState->depth * 2 : 2)
log.indent(solverState ? solverState->depth * 2 : 2)
<< "(overload set choice binding "
<< boundType->getString() << " := "
<< refType->getString() << ")\n";