This implements xref-find-{definitions,references}. It's not quite perfect
it will jump into system headers (not sure if this is good or not, I've been using it that way myself)
it will resolve a call of an overloaded function to the right definition
The find-references functionality seems a little wonky: it seems to find references to the thing at point only in the same file plus the file in which it is defined (?). Maybe I got the AST traversal logic wrong in Irony::xrefReferences, but I'm not sure.
There are several FIXME's left in the code, which may or may not be issues (please have a look), they were things I wasn't quite sure about.
I tested this in my own code, it seems to work, but I don't have any actual unit tests for it.
xref-apropos is missing because it is supposed to search for functions by string matching, and I couldn't find a way to make that into something meaningful specifically in C++.
I left for a while and completely forgot #384.
For the xref interface see https://github.com/emacs-mirror/emacs/blob/master/lisp/progmodes/xref.el, and the lisp xref backend in https://github.com/emacs-mirror/emacs/blob/master/lisp/progmodes/elisp-mode.el
This implements
xref-find-{definitions,references}
. It's not quite perfectfind-references
functionality seems a little wonky: it seems to find references to the thing at point only in the same file plus the file in which it is defined (?). Maybe I got the AST traversal logic wrong inIrony::xrefReferences
, but I'm not sure.There are several FIXME's left in the code, which may or may not be issues (please have a look), they were things I wasn't quite sure about.
I tested this in my own code, it seems to work, but I don't have any actual unit tests for it.