Douglas Gregor | 56ff871 | 2009-09-18 22:47:56 +0000 | [diff] [blame] | 1 | namespace std { |
| 2 | template<typename T> |
Douglas Gregor | d1cd31a | 2009-12-11 18:28:39 +0000 | [diff] [blame] | 3 | class allocator { |
| 4 | public: |
| 5 | void in_base(); |
| 6 | }; |
Douglas Gregor | 56ff871 | 2009-09-18 22:47:56 +0000 | [diff] [blame] | 7 | |
Douglas Gregor | d1cd31a | 2009-12-11 18:28:39 +0000 | [diff] [blame] | 8 | template<typename T, typename Alloc = std::allocator<T> > |
| 9 | class vector : Alloc { |
| 10 | public: |
| 11 | void foo(); |
| 12 | void stop(); |
| 13 | }; |
Douglas Gregor | e29ffaa | 2009-12-11 16:18:54 +0000 | [diff] [blame] | 14 | template<typename Alloc> class vector<bool, Alloc>; |
Douglas Gregor | 56ff871 | 2009-09-18 22:47:56 +0000 | [diff] [blame] | 15 | } |
| 16 | |
| 17 | void f() { |
Douglas Gregor | d1cd31a | 2009-12-11 18:28:39 +0000 | [diff] [blame] | 18 | std::vector<int> v; |
| 19 | v.foo(); |
Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 20 | // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:18:8 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s |
Douglas Gregor | 56ff871 | 2009-09-18 22:47:56 +0000 | [diff] [blame] | 21 | // CHECK-CC1: allocator<<#typename T#>> |
Douglas Gregor | e29ffaa | 2009-12-11 16:18:54 +0000 | [diff] [blame] | 22 | // CHECK-CC1-NEXT: vector<<#typename T#>{#, <#typename Alloc#>#}> |
Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 23 | // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:19:5 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s |
Douglas Gregor | d1cd31a | 2009-12-11 18:28:39 +0000 | [diff] [blame] | 24 | // CHECK-CC2: foo |
| 25 | // CHECK-CC2: in_base |
| 26 | // CHECK-CC2: stop |
Douglas Gregor | b657f11 | 2009-09-22 21:11:38 +0000 | [diff] [blame] | 27 | |
Douglas Gregor | 56ff871 | 2009-09-18 22:47:56 +0000 | [diff] [blame] | 28 | |