================
@@ -585,39 +591,94 @@ TEST(CompletionTest,
HeuristicsForMemberFunctionCompletion) {
for (const auto &P : Code.points("canNotBeCall")) {
auto Results = completions(TU, P, /*IndexSymbols*/ {}, Opts);
EXPECT_THAT(Results.Completions,
- Contains(AllOf(named("method"), signature("(int) const"),
+ Contains(AllOf(named("method"), signature("(int name) const"),
snippetSuffix(""))));
- // We don't have any arguments to deduce against if this isn't a call.
- // Thus, we should emit these deducible template arguments explicitly.
EXPECT_THAT(
Results.Completions,
Contains(AllOf(named("generic"),
- signature("<typename T, typename U>(U, V)"),
- snippetSuffix("<${1:typename T}, ${2:typename U}>"))));
+ signature("<typename T, typename U>(U nameU, V nameV)"),
+ snippetSuffix(""))));
----------------
HighCommander4 wrote:
Why are we changing the snippet behaviour here? It was deliberate.
For example:
```c++
struct Test {
template <typename T>
void foo();
};
int main() {
&Test::^
}
```
You cannot write just `&Test::foo`, you have to write `&Test::foo<SomeType>`,
so we deliberately insert `<>` with a placeholder inside.
https://github.com/llvm/llvm-project/pull/165916
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits