MaskRay / ccls

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

same name function jump #856

Open Dakaria0417 opened 2 years ago

Dakaria0417 commented 2 years ago

My proj like, old proj, not have cmake just makefile 1./root/Server/qday/logic/ 2./root/Server/qday/framework/ 3./root/Server/snsapp/***

in addr_1 can jump to definition to addr_2 such as in logic_svr.cpp call DBPut() , can jump to addr_2 Service::DBPut() in addr_3 DBPut() have same name function but not same class, if alse jump to definition, it will be jump to addr_2's definition, not addr_3,

this is in addr_1:

ret = Service::DBPut(open_id, *p_role, false);

jump to addr_2:

int Service::DBPut(), 

in this function, have

SNSAppSvr->DBPut(open_id, buffer.c_str(), buffer.length());

if i jump it will be back to addr_2's definition, not

SNSAppSvr::DBPut(const open_id_t& open_id, const void *pvValBuff, int iValSize, int iLoadFlag, int iDoRepFlag)

in my .ccls file

%h -x c++-header
-isystem/root/Server/qday/
-isystem/root/Server/snsapp/
Dakaria0417 commented 2 years ago

image