Subject: bug#59456: 29.0.50; eglot with ccls: completion inserts unwanted function signature

From: [email-masked]
Date: Mon, 21 Nov 2022 21:18:43 +0100

Put this test.c file into an empty direcotry

    int fun1 (char *a, int b) {
      return b + 1;
    }

    int fun2 (char *a, int b) {
      return b + 2;
    }

Visit it with emacs -q and do
M-: (setq completion-cycle-threshold 3)
M-x eglot RET ccls RET

At the end of the file type

    int main () { fu

and press M-TAB. "fu" completes into "fun1(char *a, int b) -> int".

Note that this isn't reproducible with clangd, so this could possibly be
a ccls bug.

clang version: 14.0.6
ccls version: 0.20220729-1