blob: 32a7b2125fec8426788454418b81ce866bd8db5c [file] [log] [blame]
Douglas Gregor56ff8712009-09-18 22:47:56 +00001namespace std {
2 template<typename T>
Douglas Gregord1cd31a2009-12-11 18:28:39 +00003 class allocator {
4 public:
5 void in_base();
6 };
Douglas Gregor56ff8712009-09-18 22:47:56 +00007
Douglas Gregord1cd31a2009-12-11 18:28:39 +00008 template<typename T, typename Alloc = std::allocator<T> >
9 class vector : Alloc {
10 public:
11 void foo();
12 void stop();
13 };
Douglas Gregore29ffaa2009-12-11 16:18:54 +000014 template<typename Alloc> class vector<bool, Alloc>;
Douglas Gregor56ff8712009-09-18 22:47:56 +000015}
16
17void f() {
Douglas Gregord1cd31a2009-12-11 18:28:39 +000018 std::vector<int> v;
19 v.foo();
Daniel Dunbara5728872009-12-15 20:14:24 +000020 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:18:8 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
Douglas Gregor56ff8712009-09-18 22:47:56 +000021 // CHECK-CC1: allocator<<#typename T#>>
Douglas Gregore29ffaa2009-12-11 16:18:54 +000022 // CHECK-CC1-NEXT: vector<<#typename T#>{#, <#typename Alloc#>#}>
Daniel Dunbara5728872009-12-15 20:14:24 +000023 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:19:5 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s
Douglas Gregord1cd31a2009-12-11 18:28:39 +000024 // CHECK-CC2: foo
25 // CHECK-CC2: in_base
26 // CHECK-CC2: stop
Douglas Gregorb657f112009-09-22 21:11:38 +000027
Douglas Gregor56ff8712009-09-18 22:47:56 +000028