Skip to content

Commit b9aa70b

Browse files
committed
[ConstraintSystem] NFC/Debug: Log solutions before attempting to diagnose ambiguity with fixes
1 parent 9067ed2 commit b9aa70b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/Sema/ConstraintSystem.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3200,6 +3200,17 @@ bool ConstraintSystem::diagnoseAmbiguityWithFixes(
32003200
if (diagnoseAmbiguityWithEphemeralPointers(*this, solutions))
32013201
return true;
32023202

3203+
if (isDebugMode()) {
3204+
auto &log = llvm::errs();
3205+
log << "--- Ambiguity: Considering #" << solutions.size()
3206+
<< " solutions with fixes ---\n";
3207+
int i = 0;
3208+
for (auto &solution : solutions) {
3209+
log << "--- Solution #" << i++ << "---\n";
3210+
solution.dump(log);
3211+
log << "\n";
3212+
}
3213+
}
32033214

32043215
// Algorithm is as follows:
32053216
//

0 commit comments

Comments
 (0)