================ @@ -761,7 +762,35 @@ void StoreDiags::HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, return false; if (!isInsideMainFile(FixIt.RemoveRange.getBegin(), SM)) return false; - Edits.push_back(toTextEdit(FixIt, SM, *LangOpts)); + + auto R = tooling::Replacement(SM, FixIt.RemoveRange, FixIt.CodeToInsert, ---------------- kadircet wrote:
we deliberately do not apply formatting here due to latency concerns. there can be many fix-its available in a file and eagerly formatting all of them is likely to affect diagnostics latencies (as clangd potentially re-evaluates them at every keystroke). can we rather perform this when the user asks for a code-action to be applied? https://github.com/llvm/llvm-project/pull/118569 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits