ccls icon indicating copy to clipboard operation
ccls copied to clipboard

failure to find reference to variable in lambda capture

Open Jacob-Burckhardt opened this issue 3 years ago • 0 comments

Observed behavior

It fails to find references to the variable "i".

int main() {
   int i=0; // line 2
   return [captureVar=i](){ return captureVar; }(); // line 3
}

Expected behavior

It should have found the reference to "i" on line 3.

Steps to reproduce

  1. Put the cursor on "i" on line 2.
  2. In emacs, run M-x xref-find-references.

System information

  • ccls version (built from source, not installed from apt): Debian ccls version 0.20220729-0-g7445891
  • clang version: 11.0.1-2
  • OS: Debian GNU/Linux 11
  • Editor: Emacs 27.1
  • Language client (and version): emacs-ccls; git rev ae74a39

Jacob-Burckhardt avatar Sep 22 '22 01:09 Jacob-Burckhardt