1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -std=c++98 -verify %s
2*f4a2713aSLionel Sambuc
3*f4a2713aSLionel Sambuc namespace N2 {
4*f4a2713aSLionel Sambuc struct S1;
5*f4a2713aSLionel Sambuc
6*f4a2713aSLionel Sambuc namespace N1 {
7*f4a2713aSLionel Sambuc class C1 {};
8*f4a2713aSLionel Sambuc
9*f4a2713aSLionel Sambuc struct S2 {
10*f4a2713aSLionel Sambuc void func(S1*); // expected-note {{type of 1st parameter of member declaration does not match definition ('N2::S1 *' vs 'N2::N1::S1 *')}}
11*f4a2713aSLionel Sambuc void func(C1&, unsigned, const S1*); // expected-note {{type of 3rd parameter of member declaration does not match definition ('const N2::S1 *' vs 'const N2::N1::S1 *')}}
12*f4a2713aSLionel Sambuc void func(const S1*, unsigned); //expected-note {{type of 1st parameter of member declaration does not match definition ('const N2::S1 *' vs 'N2::N1::S1')}}
13*f4a2713aSLionel Sambuc void func(unsigned, const S1*); // expected-note {{type of 1st parameter of member declaration does not match definition ('unsigned int' vs 'unsigned int *')}}
14*f4a2713aSLionel Sambuc };
15*f4a2713aSLionel Sambuc
16*f4a2713aSLionel Sambuc struct S1 {};
17*f4a2713aSLionel Sambuc }
18*f4a2713aSLionel Sambuc }
19*f4a2713aSLionel Sambuc
func(S1 *)20*f4a2713aSLionel Sambuc void N2::N1::S2::func(S1*) {} // expected-error {{out-of-line definition of 'func' does not match any declaration in 'N2::N1::S2'}}
func(C1 &,unsigned,const S1 *)21*f4a2713aSLionel Sambuc void N2::N1::S2::func(C1&, unsigned, const S1*) {} // expected-error {{out-of-line definition of 'func' does not match any declaration in 'N2::N1::S2'}}
func(S1 *,double)22*f4a2713aSLionel Sambuc void N2::N1::S2::func(S1*, double) {} // expected-error {{out-of-line definition of 'func' does not match any declaration in 'N2::N1::S2'}}
func(S1,unsigned)23*f4a2713aSLionel Sambuc void N2::N1::S2::func(S1, unsigned) {} // expected-error {{out-of-line definition of 'func' does not match any declaration in 'N2::N1::S2'}}
func(unsigned *,S1 *)24*f4a2713aSLionel Sambuc void N2::N1::S2::func(unsigned*, S1*) {} // expected-error {{out-of-line definition of 'func' does not match any declaration in 'N2::N1::S2'}}
25