Yes, there is a big difference. Find Definition takes you to where function/class/global variable is defined. Find Reference shows you all the places where the function/global variable is used.
But you know that already, that's why you are confused :)
You are wondering because on occasions the GTags parser cannot determine if something is definition or reference and it just marks that as a symbol (unknown existing tag). And when you do search for it later (as reference or definition) it is not found under those categories and instead is looked-up as a symbol (which leads to Find Definition and Find Reference showing the same results). Those two commands translate to Find Symbol in the mentioned case.
BR
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Greetings,
Is there any difference between Find Reference and Definition?
When I use these to command, Gtag always shows all the symbols which I want. (The plugin did a great job.)
I'm wondering, is there any differences between Find Reference and Definition?
Hi Pan,
Yes, there is a big difference.
Find Definition takes you to where function/class/global variable is defined.
Find Reference shows you all the places where the function/global variable is used.
But you know that already, that's why you are confused :)
You are wondering because on occasions the GTags parser cannot determine if something is definition or reference and it just marks that as a symbol (unknown existing tag). And when you do search for it later (as reference or definition) it is not found under those categories and instead is looked-up as a symbol (which leads to Find Definition and Find Reference showing the same results). Those two commands translate to Find Symbol in the mentioned case.
BR