usaxena95 accepted this revision. usaxena95 added a comment. This revision is now accepted and ready to land.
Thanks. LG. Couple of comments about adding tests to clangd as well. ================ Comment at: clang/test/Index/Core/index-dependent-source.cpp:233 +// CHECK: [[@LINE-1]]:3 | function/C | foo | c:@FT@>1#Tfoo#v# | <no-cgname> | Ref,Call,RelCall,RelCont | rel: 1 +} ---------------- Maybe add more tests to clangd/XrefsTests like the ones specifically mentioned in https://github.com/clangd/clangd/issues/399 - Ref in uninstantiated `bar` is reported. ``` 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 ? - ADL: May be add a negative test documenting 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); } ``` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96262/new/ https://reviews.llvm.org/D96262 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits