Lines Matching +full:function +full:- +full:bind
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s
3 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
12 class H : A {}; // expected-note 2{{implicitly declared private here}}
17 void (*A::*ppfie)() throw(); // expected-error {{exception specifications are not allowed beyond a …
21 // expected-warning@-2 {{use of enumeration in a nested name specifier is a C++11 extension}}
23 // expected-error@-4 {{'pbi' does not point into a class}}
24 int C::*pci; // expected-error {{'pci' does not point into a class}}
25 void A::*pdv; // expected-error {{'pdv' declared as a member pointer to void}}
26 int& A::*pdr; // expected-error {{'pdr' declared as a member pointer to a reference}}
45 …int F::*pdif = pdi1; // expected-error {{ambiguous conversion from pointer to member of base class… in f()
46 …int G::*pdig = pdi1; // expected-error {{conversion from pointer to member of class 'A' to pointer… in f()
49 pdi1 = pdid; // expected-error {{assigning to 'int A::*' from incompatible type 'int D::*'}} in f()
90 &hm.f; // expected-error {{cannot create a non-constant pointer to member function}} in g()
106 int i = phm->*pi; in h()
108 (void)&(phm->*pi); in h()
109 (void)&((&hm)->*pi); in h()
113 (phm->*pf)(); in h()
115 …(void)(hm->*pi); // expected-error {{left hand operand to ->* must be a pointer to class compatibl… in h()
116 …(void)(phm.*pi); // expected-error {{left hand operand to .* must be a class compatible with the r… in h()
117 …(void)(i.*pi); // expected-error {{left hand operand to .* must be a class compatible with the rig… in h()
119 …(void)(ptr->*pi); // expected-error {{left hand operand to ->* must be a pointer to class compatib… in h()
124 (void)(pd->*pai); in h()
126 …(void)(f.*pai); // expected-error {{ambiguous conversion from derived class 'F' to base class 'A'}} in h()
127 …(void)(ptrf->*pai); // expected-error {{ambiguous conversion from derived class 'F' to base class … in h()
129 (void)(h.*pai); // expected-error {{cannot cast 'H' to its private base class 'A'}} in h()
130 (void)(ptrh->*pai); // expected-error {{cannot cast 'H' to its private base class 'A'}} in h()
132 (void)(hm.*i); // expected-error {{pointer-to-member}} in h()
133 (void)(phm->*i); // expected-error {{pointer-to-member}} in h()
138 (void)(inc->*pii); in h()
143 int operator ->*(const char *);
148 int foo = m->*"Awesome!"; in i()
156 p = &h; // expected-error {{must explicitly qualify}} in f()
157 p = &this->h; // expected-error {{cannot create a non-constant pointer to member function}} in f()
158 p = &(*this).h; // expected-error {{cannot create a non-constant pointer to member function}} in f()
165 struct X; // expected-note {{forward declaration}}
169 return object->*p2m; // expected-error {{left hand operand to ->*}} in test1()
193 // function type.
194 template <class F> void bind(F f); // expected-note 12 {{candidate template ignored}}
195 …template <class F, class T> void bindmem(F (T::*f)()); // expected-note 4 {{candidate template ign…
196 template <class F> void bindfn(F (*f)()); // expected-note 4 {{candidate template ignored}}
210 bind(&nonstat); // expected-error {{no matching function for call}} in test()
211 bind(&A::nonstat); // expected-error {{no matching function for call}} in test()
213 bind(&mixed); // expected-error {{no matching function for call}} in test()
214 bind(&A::mixed); // expected-error {{no matching function for call}} in test()
216 bind(&stat); // expected-error {{no matching function for call}} in test()
217 bind(&A::stat); // expected-error {{no matching function for call}} in test()
223 bindmem(&nonstat); // expected-error {{no matching function for call}} in test()
226 bindmem(&mixed); // expected-error {{no matching function for call}} in test()
229 bindmem(&stat); // expected-error {{no matching function for call}} in test()
230 bindmem(&A::stat); // expected-error {{no matching function for call}} in test()
236 bindfn(&nonstat); // expected-error {{no matching function for call}} in test()
237 bindfn(&A::nonstat); // expected-error {{no matching function for call}} in test()
239 bindfn(&mixed); // expected-error {{no matching function for call}} in test()
240 bindfn(&A::mixed); // expected-error {{no matching function for call}} in test()
261 bind(&nonstat); in test0a()
262 bind(&B::nonstat); in test0a()
264 bind(&mixed); in test0a()
265 bind(&B::mixed); in test0a()
267 bind(&stat); in test0a()
268 bind(&B::stat); in test0a()
272 bind(&nonstat); // expected-error {{no matching function for call}} in test0b()
273 bind(&B::nonstat); // expected-error {{no matching function for call}} in test0b()
275 bind(&mixed); // expected-error {{no matching function for call}} in test0b()
276 bind(&B::mixed); // expected-error {{no matching function for call}} in test0b()
278 bind(&stat); // expected-error {{no matching function for call}} in test0b()
279 bind(&B::stat); // expected-error {{no matching function for call}} in test0b()
283 template void B<int>::test0b(); // expected-note {{in instantiation}}
292 …->*f_; } // expected-error{{reference to non-static member function must be called; did you mean t… in call()
295 { call(u); } // expected-note{{in instantiation of}} in operator ()()
307 mem_fn(&test::nullary_v)(t); // expected-note{{in instantiation of}} in f()
315 …return (*((A**) 0)) // expected-warning {{indirection of non-volatile null pointer will be deleted… in test1()
316 …->**(int A::**) 0; // expected-warning {{indirection of non-volatile null pointer will be deleted}… in test1()
323 ….**(int A::**) 0; // expected-warning {{indirection of non-volatile null pointer will be deleted}}… in test2()