We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
-debug-constraints
1 parent c39c4e8 commit 4b7ed3eCopy full SHA for 4b7ed3e
lib/Sema/ConstraintSystem.h
@@ -2929,8 +2929,12 @@ class ConstraintSystem {
2929
2930
/// Whether we should record the failure of a constraint.
2931
bool shouldRecordFailedConstraint() const {
2932
- // Only record it if we don't already have a failed constraint. This avoids
2933
- // allocating unnecessary constraints.
+ // If we're debugging, always note a failure so we can print it out.
+ if (getASTContext().TypeCheckerOpts.DebugConstraintSolver)
2934
+ return true;
2935
+
2936
+ // Otherwise, only record it if we don't already have a failed constraint.
2937
+ // This avoids allocating unnecessary constraints.
2938
return !failedConstraint;
2939
}
2940
0 commit comments