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.
E.g.
struct A
{
};
A getA() { return A(); }
int foo()
{
A a;
auto b = a;
auto c = getA();
auto d = A();
auto *e = new A();
}
I would like to make a function that could return the CXCursor for A for all of these vardecls (b, c, d and e).
The code I have is here:
https://github.com/Andersbakken/rtags/blob/master/src/RTagsClang.cpp
Starting at line 232 (resolveAutoTypeRef).
best regards and thanks for a wonderful library.
Anders
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.
E.g.
struct A
{
};
A getA() { return A(); }
int foo()
{
A a;
auto b = a;
auto c = getA();
auto d = A();
auto *e = new A();
}
I would like to make a function that could return the CXCursor for A for
all of these vardecls (b, c, d and e).
I've asked about this a while ago and it has been discussed in lengths but
without solution yet -- At some point Clang reported the deduced type, but
stopped doing so in later versions.
See full discussion here:
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-January/034845.html
Disclaimer: I'd really like to see this being fixed as well.
Greets