aboutsummaryrefslogtreecommitdiff
path: root/test/Index/complete-templates.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-09-03 23:30:36 +0000
committerDouglas Gregor <dgregor@apple.com>2010-09-03 23:30:36 +0000
commite8d7bebc0dd037516dd695ee1ac2eb0923753b46 (patch)
tree9e1129df37bbdafe6ce6e8c3f73e9ea0fac343da /test/Index/complete-templates.cpp
parent469a20de757ff872c90ff6b1134f6346909ff652 (diff)
Synchronize code-completion cursor kinds with indexing cursor
kinds. How shameful that this code was duplicated! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113033 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/complete-templates.cpp')
-rw-r--r--test/Index/complete-templates.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Index/complete-templates.cpp b/test/Index/complete-templates.cpp
new file mode 100644
index 0000000000..2f2302d08d
--- /dev/null
+++ b/test/Index/complete-templates.cpp
@@ -0,0 +1,19 @@
+// Tests are line- and column-sensive, so run lines are below.
+
+template<typename T>
+class X {
+ X();
+ X(const X&);
+
+ template<typename U> X(U);
+};
+
+template<typename T> void f(T);
+
+void test() {
+
+}
+
+// RUN: c-index-test -code-completion-at=%s:14:2 %s | FileCheck %s
+// CHECK: FunctionTemplate:{ResultType void}{TypedText f}{LeftParen (}{Placeholder T}{RightParen )} (45)
+// CHECK: ClassTemplate:{TypedText X}{LeftAngle <}{Placeholder typename T}{RightAngle >} (50)