blob: 92e651bd5eebdc985513a1e10f5e20a1a6daa766 [file] [log] [blame]
Eli Friedman2e283f02011-06-06 21:23:05 +00001// 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
Douglas Gregord2c64902010-06-18 21:30:25 +00003
4// PR7025
5struct 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
12void X0::f0() { }
13void __attribute__((regparm(3))) X0::f1() { }
Richard Smithb83a5d82013-02-21 23:15:05 +000014void __attribute__((regparm(2))) X0::f2() { } // expected-error{{function declared with regparm(2) attribute was previously declared with the regparm(3) attribute}}
15void __attribute__((regparm(2))) X0::f3() { } // expected-error{{function declared with regparm(2) attribute was previously declared without the regparm attribute}}