Skip to content

Commit c82d2a0

Browse files
authored
Merge pull request #64331 from xedin/csbindings-defaults-printing
[CSBindings] NFC: Format default bindings debug output
2 parents ed21728 + c726b00 commit c82d2a0

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

lib/Sema/CSBindings.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1931,12 +1931,15 @@ void BindingSet::dump(llvm::raw_ostream &out, unsigned indent) const {
19311931

19321932
if (!Defaults.empty()) {
19331933
out << " [defaults: ";
1934-
for (const auto &entry : Defaults) {
1935-
auto *constraint = entry.second;
1936-
auto defaultBinding =
1937-
PrintableBinding::exact(constraint->getSecondType());
1938-
defaultBinding.print(out, PO);
1939-
}
1934+
interleave(
1935+
Defaults,
1936+
[&](const auto &entry) {
1937+
auto *constraint = entry.second;
1938+
auto defaultBinding =
1939+
PrintableBinding::exact(constraint->getSecondType());
1940+
defaultBinding.print(out, PO);
1941+
},
1942+
[&] { out << ", "; });
19401943
out << "]";
19411944
}
19421945

0 commit comments

Comments
 (0)