diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-12-11 18:14:22 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-12-11 18:14:22 +0000 |
commit | ce82196076cd15f5ecfa029fcda8b58dc0146cf1 (patch) | |
tree | 6299b2d905d68a0ecaebbf65b8fea09437f79b74 /test/CodeCompletion | |
parent | ecb7e932e9274a0628477d17931a06b3b109024a (diff) |
Member function templates can occur after . or ->
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91137 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeCompletion')
-rw-r--r-- | test/CodeCompletion/function-templates.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/test/CodeCompletion/function-templates.cpp b/test/CodeCompletion/function-templates.cpp index d291bbe12b..302b95516f 100644 --- a/test/CodeCompletion/function-templates.cpp +++ b/test/CodeCompletion/function-templates.cpp @@ -6,9 +6,18 @@ namespace std { X* dyn_cast(Y *Val); } +class Foo { +public: + template<typename T> T &getAs(); +}; + void f() { - std:: - // RUN: clang-cc -fsyntax-only -code-completion-at=%s:10:8 %s -o - | FileCheck -check-prefix=CC1 %s + std::sort(1, 2); + Foo().getAs<int>(); + // RUN: clang-cc -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#>) + // CHECK-CC1: sort(<#RandomAccessIterator first#>, <#RandomAccessIterator last#> + // RUN: clang-cc -fsyntax-only -code-completion-at=%s:16:9 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s + // CHECK-CC2: getAs<<#typename T#>>() +) |