blob: 1ee35f7c36ee55997cf8e0b3644e29e3bd634f0e [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 %s -fsyntax-only -verify
Mike Stumpd1969d82009-07-22 00:43:08 +00002int f(int a) { return 0; } // expected-note {{previous definition is here}}
Douglas Gregorf0097952008-04-21 02:02:58 +00003int f(int);
Mike Stumpd1969d82009-07-22 00:43:08 +00004int f(int a) { return 0; } // expected-error {{redefinition of 'f'}}
Douglas Gregorf0097952008-04-21 02:02:58 +00005
Douglas Gregorbe109b32009-01-23 16:23:13 +00006// <rdar://problem/6097326>
7int foo(x) {
8 return 0;
9}
10int x = 1;
Douglas Gregorfbc5b492010-09-07 15:51:01 +000011
12// <rdar://problem/6880464>
13extern inline int g(void) { return 0; } // expected-note{{previous definition}}
14int g(void) { return 0; } // expected-error{{redefinition of a 'extern inline' function 'g' is not supported in C99 mode}}