1 // RUN: %clang_cc1 -fsyntax-only -Wno-strict-prototypes -verify %s
3 void blapp(int); // expected-note {{previous}}
4 void blapp() { } // expected-error {{conflicting types for 'blapp'}}
6 void yarp(int, ...); // expected-note {{previous}}
7 void yarp(); // expected-error {{conflicting types for 'yarp'}}
9 void blarg(int, ...); // expected-note {{previous}}
10 void blarg() {} // expected-error {{conflicting types for 'blarg'}}
12 void blerp(short); // expected-note {{previous}}
13 void blerp(x
) int x
; {} // expected-error {{conflicting types for 'blerp'}}
15 void foo(int); // expected-note {{previous}}
17 void foo() {} // expected-error {{conflicting types for 'foo'}}
20 void glerp(x
) short x
; {} // Okay, promoted type is fine
22 // All these cases are okay
24 void derp(x
) int x
; {}
28 void garp(x
) int x
; {}
30 // Ensure redeclarations that conflict with a builtin use a note which makes it
31 // clear that the previous declaration was a builtin.
32 float rintf() { // expected-warning {{incompatible redeclaration of library function 'rintf'}} \
33 expected
-note
{{'rintf' is a builtin with type
'float (float)'}}