<div dir="ltr">Is there an example showing how to do this? I've tried to piece something together to do it but it doesn't work correctly and is a terrible hack. <div><br></div><div>E.g.</div><div><br></div><div>struct A</div><div>{</div><div>};</div><div>A getA() { return A(); }</div><div>int foo()</div><div>{</div><div>     A a;</div><div>     auto b = a;</div><div>     auto c = getA();</div><div>     auto d = A();</div><div>     auto *e = new A();</div><div>}<br></div><div><br></div><div>I would like to make a function that could return the CXCursor for A for all of these vardecls (b, c, d and e).</div><div><br></div><div>The code I have is here:</div><div><br></div><div><a href="https://github.com/Andersbakken/rtags/blob/master/src/RTagsClang.cpp">https://github.com/Andersbakken/rtags/blob/master/src/RTagsClang.cpp</a><br></div><div><br></div><div>Starting at line 232 (resolveAutoTypeRef).</div><div><br></div><div>best regards and thanks for a wonderful library.</div><div><br></div><div>Anders</div></div>