1 // RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-pc-linux-gnu %s 2 // RUN: %clang_cc1 -fsyntax-only -verify -triple i686-apple-darwin10 %s 3 4 // PR7025 5 struct X0 { 6 void __attribute__((regparm(3))) f0(); 7 void __attribute__((regparm(3))) f1(); 8 void __attribute__((regparm(3))) f2(); // expected-note{{previous declaration is here}} 9 void f3(); // expected-note{{previous declaration is here}} 10 }; 11 f0()12void X0::f0() { } f1()13void __attribute__((regparm(3))) X0::f1() { } f2()14void __attribute__((regparm(2))) X0::f2() { } // expected-error{{function declared with regparm(2) attribute was previously declared with the regparm(3) attribute}} f3()15void __attribute__((regparm(2))) X0::f3() { } // expected-error{{function declared with regparm(2) attribute was previously declared without the regparm attribute}} 16