Details
Details
Diff Detail
Diff Detail
- Repository
 - rG LLVM Github Monorepo
 
Unit Tests
Unit Tests
Event Timeline
Comment Actions
Thanks. LG.
Couple of comments about adding tests to clangd as well.
| clang/test/Index/Core/index-dependent-source.cpp | ||
|---|---|---|
| 233 | Maybe add more tests to clangd/XrefsTests like the ones specifically mentioned in https://github.com/clangd/clangd/issues/399 
 template <typename T> void $decl[[foo]](T t); 
template <typename T> void bar(T t) { [[foo]](t); }
void baz(int x) { [[f^oo]](x); }What do you think about the behaviour ? 
 namespace ns {
struct S{};
void $decl[[foo]](S s);
}
template <typename T> void foo(T t); 
template <typename T> void bar(T t) { foo(t); } // FIXME: Maybe report this foo as a ref to ns::foo when bar<ns::S> is instantiated?
void baz(int x) { 
  ns::S s;
  bar<ns::S>(s);
  [[f^oo]](s); 
} | |
Maybe add more tests to clangd/XrefsTests like the ones specifically mentioned in https://github.com/clangd/clangd/issues/399
template <typename T> void $decl[[foo]](T t); template <typename T> void bar(T t) { [[foo]](t); } void baz(int x) { [[f^oo]](x); }What do you think about the behaviour ?
Should we report the ref in bar in the following example ?
namespace ns { struct S{}; void $decl[[foo]](S s); } template <typename T> void foo(T t); template <typename T> void bar(T t) { foo(t); } // FIXME: Maybe report this foo as a ref to ns::foo when bar<ns::S> is instantiated? void baz(int x) { ns::S s; bar<ns::S>(s); [[f^oo]](s); }