Please do anyone know if clang has option to return symbol definition or declaration(or reference)?
I mean: there is option for clang executable called -code-completion-at=path_to_file:line:coloumn the clang will look into code and returns you completion strings(ie if there is for example std::string_type_variable. ..it returns to you all the methods and attributes you can call from std::string.
Now what i want is, for clang to return the file and coordinates, where the definition of the symbols starts .. so if it std::string_type_variable - i want to return to me coordinates, where i have writte std::string variable; in the code.
I want to use it in vim instead of cscope/ctags obsolete functionality(tags system using ctags/cscope in vim doesnt know context - its not usable at all in bigger projects) I know there is clang followup(http://blog.wuwon.id.au/2011/10/vim-plugin-for-navigating-c-with.html) but it doesnt work correctly(actually doesnt work for me at all)
Is it even possible? it shouldn't be that hard, if it can return the completion, it probably already knows, where from he read the definition of the variable...