File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1897,6 +1897,18 @@ ConstraintSystem::solve(Expr *&expr,
1897
1897
ExprTypeCheckListener *listener,
1898
1898
SmallVectorImpl<Solution> &solutions,
1899
1899
FreeTypeVariableBinding allowFreeTypeVariables) {
1900
+ if (TC.getLangOpts ().DebugConstraintSolver ) {
1901
+ auto &log = getASTContext ().TypeCheckerDebug ->getStream ();
1902
+ log << " ---Constraint solving for the expression at " ;
1903
+ auto R = expr->getSourceRange ();
1904
+ if (R.isValid ()) {
1905
+ R.print (log, TC.Context .SourceMgr , /* PrintText=*/ false );
1906
+ } else {
1907
+ log << " <invalid range>" ;
1908
+ }
1909
+ log << " ---\n " ;
1910
+ }
1911
+
1900
1912
assert (!solverState && " use solveRec for recursive calls" );
1901
1913
1902
1914
// Try to shrink the system by reducing disjunction domains. This
You can’t perform that action at this time.
0 commit comments