diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-04-05 21:04:10 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-04-05 21:04:10 +0000 |
commit | 2ec76747f4f5166017a832cf738154786afdcbb9 (patch) | |
tree | a5c1582a1b315157d0a7f979c542271bfada161d /clang/test/Index/get-cursor.cpp | |
parent | fac2db4a3d965669fc9a54f271c731cca8177ae3 (diff) | |
download | bcm5719-llvm-2ec76747f4f5166017a832cf738154786afdcbb9.tar.gz bcm5719-llvm-2ec76747f4f5166017a832cf738154786afdcbb9.zip |
[libclang] Fix cursor visitation to not ignore template arguments in out-of-line member functions.
rdar://13535645
llvm-svn: 178911
Diffstat (limited to 'clang/test/Index/get-cursor.cpp')
-rw-r--r-- | clang/test/Index/get-cursor.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/Index/get-cursor.cpp b/clang/test/Index/get-cursor.cpp index 8b70216dd16..37bb70f3075 100644 --- a/clang/test/Index/get-cursor.cpp +++ b/clang/test/Index/get-cursor.cpp @@ -47,6 +47,14 @@ void test() { }; } +template <bool (*tfn)(X*)> +struct TS { + void foo(); +}; + +template <bool (*tfn)(X*)> +void TS<tfn>::foo() {} + // RUN: c-index-test -cursor-at=%s:6:4 %s | FileCheck -check-prefix=CHECK-COMPLETION-1 %s // CHECK-COMPLETION-1: CXXConstructor=X:6:3 // CHECK-COMPLETION-1-NEXT: Completion string: {TypedText X}{LeftParen (}{Placeholder int}{Comma , }{Placeholder int}{RightParen )} @@ -103,3 +111,7 @@ void test() { // RUN: c-index-test -cursor-at=%s:45:9 %s | FileCheck -check-prefix=CHECK-LOCALCLASS %s // CHECK-LOCALCLASS: 45:9 DeclRefExpr=x:44:11 Extent=[45:9 - 45:10] Spelling=x ([45:9 - 45:10]) + +// RUN: c-index-test -cursor-at=%s:50:23 -cursor-at=%s:55:23 %s | FileCheck -check-prefix=CHECK-TEMPLPARAM %s +// CHECK-TEMPLPARAM: 50:23 TypeRef=struct X:3:8 Extent=[50:23 - 50:24] Spelling=struct X ([50:23 - 50:24]) +// CHECK-TEMPLPARAM: 55:23 TypeRef=struct X:3:8 Extent=[55:23 - 55:24] Spelling=struct X ([55:23 - 55:24]) |