MaskRay / ccls

C/C++/ObjC language server supporting cross references, hierarchies, completion and semantic highlighting
Apache License 2.0
3.73k stars 254 forks source link

constructor call not found for member object #902

Open Jacob-Burckhardt opened 1 year ago

Jacob-Burckhardt commented 1 year ago

Observed behavior

After asking for calls to Blob() it finds a call on line 8 but not on line 7.

class Blob {
public:
   Blob() {} // line 3
};

class Chunk {
   Blob b; // line 7
   Blob *p = new Blob; // line 8
};

int main() {
   Chunk c;
}

Expected behavior

It should have also found the call to the Blob constructor on line 7.

Steps to reproduce

  1. Put the cursor on "B" in the Blob declaration on line 3.
  2. In emacs, run M-x xref-find-references to find calls to the Blob constructor.

System information