2009-03-24 10:24:46 +08:00
|
|
|
// RUN: clang-cc -fsyntax-only -pedantic -verify %s
|
2008-10-22 07:43:52 +08:00
|
|
|
int* quals1(int const * p);
|
|
|
|
int* quals2(int const * const * pp);
|
2009-02-04 08:32:51 +08:00
|
|
|
int* quals3(int const * * const * ppp); // expected-note{{candidate function}}
|
2008-10-22 07:43:52 +08:00
|
|
|
|
|
|
|
void test_quals(int * p, int * * pp, int * * * ppp) {
|
|
|
|
int const * const * pp2 = pp;
|
|
|
|
quals1(p);
|
|
|
|
quals2(pp);
|
2009-02-04 08:32:51 +08:00
|
|
|
quals3(ppp); // expected-error {{no matching}}
|
2008-10-22 07:43:52 +08:00
|
|
|
}
|
2009-01-26 03:43:20 +08:00
|
|
|
|
|
|
|
struct A {};
|
|
|
|
void mquals1(int const A::*p);
|
|
|
|
void mquals2(int const A::* const A::*pp);
|
2009-02-04 08:32:51 +08:00
|
|
|
void mquals3(int const A::* A::* const A::*ppp); // expected-note{{candidate function}}
|
2009-01-26 03:43:20 +08:00
|
|
|
|
|
|
|
void test_mquals(int A::*p, int A::* A::*pp, int A::* A::* A::*ppp) {
|
|
|
|
int const A::* const A::* pp2 = pp;
|
|
|
|
mquals1(p);
|
|
|
|
mquals2(pp);
|
2009-02-04 08:32:51 +08:00
|
|
|
mquals3(ppp); // expected-error {{no matching}}
|
2009-01-26 03:43:20 +08:00
|
|
|
}
|