summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/unittests/XRefsTests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clangd/unittests/XRefsTests.cpp')
-rw-r--r--clang-tools-extra/clangd/unittests/XRefsTests.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/unittests/XRefsTests.cpp b/clang-tools-extra/clangd/unittests/XRefsTests.cpp
index cbc81805fd7..cb34dac7ec0 100644
--- a/clang-tools-extra/clangd/unittests/XRefsTests.cpp
+++ b/clang-tools-extra/clangd/unittests/XRefsTests.cpp
@@ -1300,6 +1300,19 @@ TEST(Hover, All) {
"text[Typedef]",
},
{
+ R"cpp(// Typedef with embedded definition
+ typedef struct Bar {} Foo;
+ int main() {
+ ^Foo bar;
+ }
+ )cpp",
+ "text[Declared in]code[global namespace]\n"
+ "codeblock(cpp) [\n"
+ "typedef struct Bar Foo\n"
+ "]\n"
+ "text[Typedef with embedded definition]",
+ },
+ {
R"cpp(// Namespace
namespace ns {
struct Foo { static void bar(); }
OpenPOWER on IntegriCloud