aboutsummaryrefslogtreecommitdiff
path: root/test/Index/index-templates.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-09-01 20:21:58 +0000
committerDouglas Gregor <dgregor@apple.com>2010-09-01 20:21:58 +0000
commit662df6e9e5152be90a746b6b66d9959ba37fdfdd (patch)
treec254ecab4c7935bef66ac7d1dfdfa4555d5edc73 /test/Index/index-templates.cpp
parent84b51d77e11aaf6ea4607e01187343423ce6c8ae (diff)
Test visiting the template parameters of template template parameters,
support for which came in with the last commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112735 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/index-templates.cpp')
-rw-r--r--test/Index/index-templates.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Index/index-templates.cpp b/test/Index/index-templates.cpp
index b3d6465c4a..1070e06a4c 100644
--- a/test/Index/index-templates.cpp
+++ b/test/Index/index-templates.cpp
@@ -39,6 +39,11 @@ struct array;
template<template<typename, unsigned> class DataStructure = array>
struct storage;
+typedef unsigned Unsigned;
+
+template<typename T, Unsigned Value>
+struct value_c;
+
// RUN: c-index-test -test-load-source all %s | FileCheck -check-prefix=CHECK-LOAD %s
// CHECK-LOAD: index-templates.cpp:4:6: FunctionTemplate=f:4:6 Extent=[3:1 - 4:22]
// CHECK-LOAD: index-templates.cpp:3:19: TemplateTypeParameter=T:3:19 (Definition) Extent=[3:19 - 3:20]
@@ -84,6 +89,11 @@ struct storage;
// CHECK-LOAD: index-templates.cpp:39:19: TemplateTypeParameter=:39:19 (Definition) Extent=[39:19 - 39:27]
// CHECK-LOAD: index-templates.cpp:39:37: NonTypeTemplateParameter=:39:37 (Definition) Extent=[39:29 - 39:38]
// CHECK-LOAD: index-templates.cpp:39:61: TemplateRef=array:37:8 Extent=[39:61 - 39:66]
+// CHECK-LOAD: index-templates.cpp:42:18: TypedefDecl=Unsigned:42:18 (Definition) Extent=[42:18 - 42:26]
+// CHECK-LOAD: index-templates.cpp:45:8: ClassTemplate=value_c:45:8 Extent=[44:1 - 45:15]
+// CHECK-LOAD: index-templates.cpp:44:19: TemplateTypeParameter=T:44:19 (Definition) Extent=[44:19 - 44:20]
+// CHECK-LOAD: index-templates.cpp:44:31: NonTypeTemplateParameter=Value:44:31 (Definition) Extent=[44:22 - 44:36]
+// CHECK-LOAD: index-templates.cpp:44:22: TypeRef=Unsigned:42:18 Extent=[44:22 - 44:30]
// RUN: c-index-test -test-load-source-usrs all %s | FileCheck -check-prefix=CHECK-USRS %s
// CHECK-USRS: index-templates.cpp c:@FT@>3#T#Nt0.0#t>2#T#Nt1.0f#>t0.22t0.0# Extent=[3:1 - 4:22]