aboutsummaryrefslogtreecommitdiff
path: root/test/Index/annotate-nested-name-specifier.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Index/annotate-nested-name-specifier.cpp')
-rw-r--r--test/Index/annotate-nested-name-specifier.cpp36
1 files changed, 35 insertions, 1 deletions
diff --git a/test/Index/annotate-nested-name-specifier.cpp b/test/Index/annotate-nested-name-specifier.cpp
index 150a34af1b..b2f6a26e61 100644
--- a/test/Index/annotate-nested-name-specifier.cpp
+++ b/test/Index/annotate-nested-name-specifier.cpp
@@ -110,7 +110,23 @@ struct X6 {
typedef class outer_alias::inner::vector<type>::template rebind<type>::other type4;
};
-// RUN: c-index-test -test-annotate-tokens=%s:13:1:111:1 %s | FileCheck %s
+namespace outer {
+ namespace inner {
+ template<typename T, template<class> class TT>
+ struct apply_meta {
+ typedef typename TT<T>::type type;
+ };
+ }
+}
+
+template<typename T, typename U>
+struct X7 {
+ typedef T T_type;
+ typedef U U_type;
+ typedef outer_alias::inner::apply_meta<T_type, U_type::template apply> type;
+};
+
+// RUN: c-index-test -test-annotate-tokens=%s:13:1:128:1 %s | FileCheck %s
// CHECK: Keyword: "using" [14:1 - 14:6] UsingDeclaration=vector[4:12]
// CHECK: Identifier: "outer_alias" [14:7 - 14:18] NamespaceRef=outer_alias:10:11
@@ -404,3 +420,21 @@ struct X6 {
// CHECK: Punctuation: "::" [110:72 - 110:74] TypedefDecl=type4:110:80 (Definition)
// CHECK: Identifier: "other" [110:74 - 110:79] TypedefDecl=type4:110:80 (Definition)
// CHECK: Identifier: "type4" [110:80 - 110:85] TypedefDecl=type4:110:80 (Definition)
+
+// Template template arguments
+// CHECK: Keyword: "typedef" [126:3 - 126:10] ClassTemplate=X7:123:8 (Definition)
+// CHECK: Identifier: "outer_alias" [126:11 - 126:22] NamespaceRef=outer_alias:10:11
+// CHECK: Punctuation: "::" [126:22 - 126:24] TypedefDecl=type:126:74 (Definition)
+// CHECK: Identifier: "inner" [126:24 - 126:29] NamespaceRef=inner:114:13
+// CHECK: Punctuation: "::" [126:29 - 126:31] TypedefDecl=type:126:74 (Definition)
+// CHECK: Identifier: "apply_meta" [126:31 - 126:41] TemplateRef=apply_meta:116:12
+// CHECK: Punctuation: "<" [126:41 - 126:42] TypedefDecl=type:126:74 (Definition)
+// CHECK: Identifier: "T_type" [126:42 - 126:48] TypeRef=T_type:124:13
+// CHECK: Punctuation: "," [126:48 - 126:49] TypedefDecl=type:126:74 (Definition)
+// CHECK: Identifier: "U_type" [126:50 - 126:56] TypeRef=U_type:125:13
+// CHECK: Punctuation: "::" [126:56 - 126:58] TypedefDecl=type:126:74 (Definition)
+// CHECK: Keyword: "template" [126:58 - 126:66] TypedefDecl=type:126:74 (Definition)
+// CHECK: Identifier: "apply" [126:67 - 126:72] TypedefDecl=type:126:74 (Definition)
+// CHECK: Punctuation: ">" [126:72 - 126:73] TypedefDecl=type:126:74 (Definition)
+// CHECK: Identifier: "type" [126:74 - 126:78] TypedefDecl=type:126:74 (Definition)
+