-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Index template instantiations #813
Comments
Hi Tim Yeah. It's a bit of a sore point for rtags. I haven't put a lot of time Anders On Mon, Oct 3, 2016 at 7:04 AM, tnicolson notifications@github.com wrote:
|
Thanks Anders, Would clang_getSpecializedCursorTemplate help? Tim |
I guess this is not easy, I think libclang doesn't expose the full AST for c++, but it would be super good. |
I ran into this one today, too. But in my case I don't even use the templated typename to get to the information. The fact that the struct is templated seems to induce the failure. Here's my testcase: #include <vector>
struct foo
{
int bar;
};
template <bool dummy>
struct temple_struct
{
std::vector<foo> vec;
foo foo_inst;
void fn()
{
vec[0].bar = 1; // 'bar' here is never associated with foo
foo_inst.bar = 2;
}
};
struct some_struct
{
std::vector<foo> vec;
foo foo_inst;
void fn()
{
vec[0].bar = 3;
foo_inst.bar = 4;
}
}; Now if I try to find all uses of "foo::bar" rtags returns three hits:
It misses only the one in |
Hi Anders,
Thanks so much for developing rtags; it's fast becoming indispensible!
Please consider the following code:
When requesting references at point on x, rtags currently doesn't find references in functions f or g. How difficult would it be to get rtags to index the template instantiations create when f and g are called?
Thanks,
Tim
The text was updated successfully, but these errors were encountered: