From 87c642b9d1dc09c25f49919a51d069dbe4a29b9c Mon Sep 17 00:00:00 2001 From: Varun Gandhi Date: Thu, 28 Sep 2023 18:55:44 -0400 Subject: [PATCH] test(wip): Add more tests on type aliases --- test/index/types/type_alias.cc | 8 ++++++++ test/index/types/type_alias.snapshot.cc | 16 ++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 test/index/types/type_alias.cc create mode 100644 test/index/types/type_alias.snapshot.cc diff --git a/test/index/types/type_alias.cc b/test/index/types/type_alias.cc new file mode 100644 index 00000000..ba1ecc66 --- /dev/null +++ b/test/index/types/type_alias.cc @@ -0,0 +1,8 @@ +template +struct S {}; + +typedef Nonexistent Sint; + +struct R { + typedef S Ssint; +}; diff --git a/test/index/types/type_alias.snapshot.cc b/test/index/types/type_alias.snapshot.cc new file mode 100644 index 00000000..27eaa986 --- /dev/null +++ b/test/index/types/type_alias.snapshot.cc @@ -0,0 +1,16 @@ + template +//^^^^^^^^ definition [..] `/type_alias.cc`/ +// ^ definition local 0 + struct S {}; +// ^ definition [..] S# + + typedef Nonexistent Sint; +// ^^^^ definition [..] Sint# + + struct R { +// ^ definition [..] R# + typedef S Ssint; +// ^ reference [..] S# +// ^^^^ reference [..] Sint# +// ^^^^^ definition [..] R#Ssint# + };