summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/index-templates.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-08-31 19:31:58 +0000
committerDouglas Gregor <dgregor@apple.com>2010-08-31 19:31:58 +0000
commitf96abb293a4de64a16acb64b273b4e9ae4a14639 (patch)
treee3f1598c153102aee1e6a141da6041f9c11cfcce /clang/test/Index/index-templates.cpp
parent6fdcb172a9df9ba130dc5b0f48dd6b95315a0e5b (diff)
downloadbcm5719-llvm-f96abb293a4de64a16acb64b273b4e9ae4a14639.tar.gz
bcm5719-llvm-f96abb293a4de64a16acb64b273b4e9ae4a14639.zip
Add libclang support for class template partial specializations,
including a cursor kind, visitation, and USRs. llvm-svn: 112629
Diffstat (limited to 'clang/test/Index/index-templates.cpp')
-rw-r--r--clang/test/Index/index-templates.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Index/index-templates.cpp b/clang/test/Index/index-templates.cpp
index 777c66e1a5d..fb22f884d36 100644
--- a/clang/test/Index/index-templates.cpp
+++ b/clang/test/Index/index-templates.cpp
@@ -9,6 +9,9 @@ template<typename T, typename Alloc = allocator<T> >
class vector {
};
+template<typename T>
+class vector<T*> { };
+
// 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]
@@ -24,6 +27,9 @@ class vector {
// CHECK-LOAD: index-templates.cpp:9:7: ClassTemplate=vector:9:7 (Definition) Extent=[8:1 - 10:2]
// CHECK-LOAD: index-templates.cpp:8:19: TemplateTypeParameter=T:8:19 (Definition) Extent=[8:19 - 8:20]
// CHECK-LOAD: index-templates.cpp:8:31: TemplateTypeParameter=Alloc:8:31 (Definition) Extent=[8:31 - 8:36]
+// CHECK-LOAD: index-templates.cpp:13:7: ClassTemplatePartialSpecialization=vector:13:7 (Definition) Extent=[12:1 - 13:21]
+// CHECK-LOAD: index-templates.cpp:12:19: TemplateTypeParameter=T:12:19 (Definition) Extent=[12:19 - 12:20]
+// FIXME: Need the template type parameter here
// 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]
@@ -34,3 +40,5 @@ class vector {
// CHECK-USRS: index-templates.cpp c:@CT>1#T@allocator Extent=[6:1 - 6:37]
// CHECK-USRS: index-templates.cpp c:index-templates.cpp@171 Extent=[6:19 - 6:20]
// CHECK-USRS: index-templates.cpp c:@CT>2#T#T@vector Extent=[8:1 - 10:2]
+// CHECK-USRS: index-templates.cpp c:index-templates.cpp@264@CP>1#T@vector Extent=[12:1 - 13:21]
+// CHECK-USRS: index-templates.cpp c:index-templates.cpp@282 Extent=[12:19 - 12:20]
OpenPOWER on IntegriCloud