================
@@ -1923,6 +1923,42 @@ TEST(FindImplementations, Inheritance) {
}
}
+TEST(FindImplementations, InheritanceRecursion) {
+ // Make sure inheritance is followed, but does not diverge.
+ llvm::StringRef Test = R"cpp(
+ template <int>
+ struct [[Ev^en]];
----------------
HighCommander4 wrote:
nit: It's a bit misleading that the test is using
[`LocatedSymbol::PreferredDeclaration`](https://searchfox.org/llvm/rev/f4d41a4efb2359a54a3879cd056db2fdb5082b80/clang-tools-extra/clangd/unittests/XRefsTests.cpp#55),
which in this case is the forward-decl, when the [actual LSP
request](https://searchfox.org/llvm/rev/f4d41a4efb2359a54a3879cd056db2fdb5082b80/clang-tools-extra/clangd/ClangdLSPServer.cpp#1531)
returns `LocatedSymbol::Definition` when available (here, the primary template
definition).
Can we introduce a `defRange` and use that in `findImplementations` tests?
https://github.com/llvm/llvm-project/pull/177564
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits