diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-09-02 21:07:44 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-09-02 21:07:44 +0000 |
commit | fbb4c98a248c54d31063aa41dbfacf4f78c93f10 (patch) | |
tree | 7eb987d0f561220004c785371e931dfc1f0b82e4 /test/Index/index-templates.cpp | |
parent | 066d66096520c015036ef20bbbfe100b88e2a2d1 (diff) |
In libclang, visit the nested-name-specifier and explicitly-specified template arguments of a MemberExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112860 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/index-templates.cpp')
-rw-r--r-- | test/Index/index-templates.cpp | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/test/Index/index-templates.cpp b/test/Index/index-templates.cpp index 1074583c74..a4f1ee8d2c 100644 --- a/test/Index/index-templates.cpp +++ b/test/Index/index-templates.cpp @@ -46,8 +46,13 @@ struct value_c; template class vector<int*>; +struct Z4 { + template<typename T> T getAs(); +}; + void template_exprs() { f<Unsigned, OneDimension, array>(array<Unsigned, OneDimension>()); + Z4().getAs<Unsigned>(); } // RUN: c-index-test -test-load-source all %s | FileCheck -check-prefix=CHECK-LOAD %s @@ -101,11 +106,20 @@ void template_exprs() { // 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] // CHECK-LOAD: index-templates.cpp:47:16: ClassDecl=vector:47:16 (Definition) [Specialization of vector:14:7] Extent=[47:1 - 47:22] -// CHECK-LOAD: index-templates.cpp:49:6: FunctionDecl=template_exprs:49:6 (Definition) Extent=[49:6 - 51:2] -// CHECK-LOAD: index-templates.cpp:50:3: DeclRefExpr=f:4:6 Extent=[50:3 - 50:35] -// CHECK-LOAD: index-templates.cpp:50:5: TypeRef=Unsigned:42:18 Extent=[50:5 - 50:13] -// CHECK-LOAD: index-templates.cpp:50:15: DeclRefExpr=OneDimension:35:16 Extent=[50:15 - 50:27] -// CHECK-LOAD: index-templates.cpp:50:29: TemplateRef=array:37:8 Extent=[50:29 - 50:34] +// CHECK-LOAD: index-templates.cpp:49:8: StructDecl=Z4:49:8 (Definition) Extent=[49:1 - 51:2] +// CHECK-LOAD: index-templates.cpp:50:26: FunctionTemplate=getAs:50:26 Extent=[50:3 - 50:33] +// CHECK-LOAD: index-templates.cpp:50:21: TemplateTypeParameter=T:50:21 (Definition) Extent=[50:21 - 50:22] +// CHECK-LOAD: index-templates.cpp:53:6: FunctionDecl=template_exprs:53:6 (Definition) +// CHECK-LOAD: <invalid loc>:0:0: UnexposedStmt= +// CHECK-LOAD: index-templates.cpp:54:3: CallExpr=f:4:6 Extent=[54:3 - 54:68] +// CHECK-LOAD: index-templates.cpp:54:3: UnexposedExpr=f:4:6 Extent=[54:3 - 54:35] +// CHECK-LOAD: index-templates.cpp:54:3: DeclRefExpr=f:4:6 Extent=[54:3 - 54:35] +// CHECK-LOAD: index-templates.cpp:54:5: TypeRef=Unsigned:42:18 Extent=[54:5 - 54:13] +// CHECK-LOAD: index-templates.cpp:54:15: DeclRefExpr=OneDimension:35:16 Extent=[54:15 - 54:27] +// CHECK-LOAD: index-templates.cpp:54:29: TemplateRef=array:37:8 Extent=[54:29 - 54:34] +// CHECK-LOAD: index-templates.cpp:55:8: MemberRefExpr=getAs:50:26 Extent=[55:3 - 55:23] +// CHECK-LOAD: index-templates.cpp:55:3: CallExpr= Extent=[55:3 - 55:7] +// CHECK-LOAD: index-templates.cpp:55:14: TypeRef=Unsigned:42:18 Extent=[55:14 - 55:22] // 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] |