Reputation: 2086
I'm getting No references found
message whenever I use "semantic-symref-symbol" (C-c , g) trying to get all the references to any symbol, whether the symbol is a C++ class member variable or a local variable, it just couldn't find any reference. The gtag database are under my project root. In my .emacs file I have the following:
(require 'semanticdb-global)
(semanticdb-enable-gnu-global-databases 'c-mode)
(semanticdb-enable-gnu-global-databases 'c++-mode)
When I type "global -xs symbol" under command line, it shows all the reference to the symbol correctly. But why semantic couldn't find anything? On the other hand, 'semantic-symref' works fine on looking for references of a class or class member function, but it doesn't work for variables.
Is it simply a bug, or am I missing anything that keeps symbol reference from working?
Upvotes: 0
Views: 1141
Reputation: 3949
This problem is with how GNU Global is used in Semantic came up on the mailing list the other day. GNU Global lets you find occurances of tags (with -r) or random symbols (-s), and Semantic uses the -r flag, and the variables you mention are not considered tags by GNU Global.
In the cedet-global.el support file the function cedet-gnu-global-search
, it was proposed to use or add the -s flag when searching for a 'symbol. I don't know what the resolution will be at this time, however.
You can see the whole thread on the cedet-devel mailing list:
Upvotes: 1