[clang] [clang-tools-extra] [clangd] Add InsertReplaceEdit for code completion (PR #187623)

via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 19 19:49:32 PDT 2026


================
@@ -1832,19 +1847,26 @@ class CodeCompleteFlow {
   CodeCompleteResult runWithSema() {
     const auto &CodeCompletionRange = CharSourceRange::getCharRange(
         Recorder->CCSema->getPreprocessor().getCodeCompletionTokenRange());
+
+    const SourceManager &SM = Recorder->CCSema->getSourceManager();
----------------
argothiel wrote:

Extracting `Recorder->CCSema->getSourceManager()` as it was already used twice in the code, and I didn't want to copy it for the third time for my change.

https://github.com/llvm/llvm-project/pull/187623


More information about the cfe-commits mailing list