[Lldb-commits] [lldb] [lldb] Improve rendering of inline diagnostics on the same column (PR #116727)
Felipe de Azevedo Piovezan via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 19 09:29:23 PST 2024
================
@@ -130,6 +131,25 @@ void RenderDiagnosticDetails(Stream &stream,
}
stream << '\n';
+ // Reverse the order within groups of diagnostics that are on the same column.
+ auto group = [](const std::vector<DiagnosticDetail> &details) {
+ uint16_t column = 0;
+ std::vector<DiagnosticDetail> result, group;
+ for (auto &d : details) {
+ if (d.source_location->column == column) {
+ group.push_back(d);
+ continue;
+ }
+ result.insert(result.end(), group.rbegin(), group.rend());
+ group.clear();
+ column = d.source_location->column;
+ group.push_back(d);
+ }
+ result.insert(result.end(), group.rbegin(), group.rend());
+ return result;
+ };
+ remaining_details = group(remaining_details);
+
----------------
felipepiovezan wrote:
Oh, it's already been merged, nvm
https://github.com/llvm/llvm-project/pull/116727
More information about the lldb-commits
mailing list