From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/CodeCompletion/function-templates.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 clang/test/CodeCompletion/function-templates.cpp (limited to 'clang/test/CodeCompletion/function-templates.cpp') diff --git a/clang/test/CodeCompletion/function-templates.cpp b/clang/test/CodeCompletion/function-templates.cpp new file mode 100644 index 0000000..cdbbf75 --- /dev/null +++ b/clang/test/CodeCompletion/function-templates.cpp @@ -0,0 +1,23 @@ +namespace std { + template + void sort(RandomAccessIterator first, RandomAccessIterator last); + + template + X* dyn_cast(Y *Val); +} + +class Foo { +public: + template T &getAs(); +}; + +void f() { + std::sort(1, 2); + Foo().getAs(); + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:15:8 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s + // CHECK-CC1: dyn_cast<<#class X#>>(<#Y *Val#>) + // CHECK-CC1: sort(<#RandomAccessIterator first#>, <#RandomAccessIterator last#> + // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:16:9 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s + // CHECK-CC2: getAs<<#typename T#>>() +) + -- cgit v1.2.3