blob: 01e503ddac6c8a318aa472c098fd50dea16a099a [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -fsyntax-only -pedantic -verify %s
Douglas Gregor98cd5992008-10-21 23:43:52 +00002int* quals1(int const * p);
3int* quals2(int const * const * pp);
Douglas Gregorfa047642009-02-04 00:32:51 +00004int* quals3(int const * * const * ppp); // expected-note{{candidate function}}
Douglas Gregor98cd5992008-10-21 23:43:52 +00005
6void test_quals(int * p, int * * pp, int * * * ppp) {
7 int const * const * pp2 = pp;
8 quals1(p);
9 quals2(pp);
Douglas Gregorfa047642009-02-04 00:32:51 +000010 quals3(ppp); // expected-error {{no matching}}
Douglas Gregor98cd5992008-10-21 23:43:52 +000011}
Sebastian Redl4433aaf2009-01-25 19:43:20 +000012
13struct A {};
14void mquals1(int const A::*p);
15void mquals2(int const A::* const A::*pp);
Douglas Gregorfa047642009-02-04 00:32:51 +000016void mquals3(int const A::* A::* const A::*ppp); // expected-note{{candidate function}}
Sebastian Redl4433aaf2009-01-25 19:43:20 +000017
18void test_mquals(int A::*p, int A::* A::*pp, int A::* A::* A::*ppp) {
19 int const A::* const A::* pp2 = pp;
20 mquals1(p);
21 mquals2(pp);
Douglas Gregorfa047642009-02-04 00:32:51 +000022 mquals3(ppp); // expected-error {{no matching}}
Sebastian Redl4433aaf2009-01-25 19:43:20 +000023}