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

via cfe-commits cfe-commits at lists.llvm.org
Fri May 1 12:50:03 PDT 2026


argothiel wrote:

Actually, there is already a FIXME in CodeCompleteTests.cpp for that case:
```cpp
// FIXME(kirillbobyrev): No snippet should be produced here.
  EXPECT_THAT(completions(Context + "int y = fo^o(42)", {}, Opts).Completions,
              UnorderedElementsAre(
                  AllOf(labeled("foo(int A)"), snippetSuffix("(${1:int A})"))));
```

Which convinces me, it should be a separate follow-up PR, fixing both (current) insert and (new) replace behavior.

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


More information about the cfe-commits mailing list