ccls
ccls copied to clipboard
failure to find reference to variable in lambda capture
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
- Put the cursor on "i" on line 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