Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -fsyntax-only -verify |
Mike Stump | d1969d8 | 2009-07-22 00:43:08 +0000 | [diff] [blame] | 2 | int f(int a) { return 0; } // expected-note {{previous definition is here}} |
Douglas Gregor | f009795 | 2008-04-21 02:02:58 +0000 | [diff] [blame] | 3 | int f(int); |
Mike Stump | d1969d8 | 2009-07-22 00:43:08 +0000 | [diff] [blame] | 4 | int f(int a) { return 0; } // expected-error {{redefinition of 'f'}} |
Douglas Gregor | f009795 | 2008-04-21 02:02:58 +0000 | [diff] [blame] | 5 | |
Douglas Gregor | be109b3 | 2009-01-23 16:23:13 +0000 | [diff] [blame] | 6 | // <rdar://problem/6097326> |
| 7 | int foo(x) { |
| 8 | return 0; |
| 9 | } |
| 10 | int x = 1; |
Douglas Gregor | fbc5b49 | 2010-09-07 15:51:01 +0000 | [diff] [blame] | 11 | |
| 12 | // <rdar://problem/6880464> |
| 13 | extern inline int g(void) { return 0; } // expected-note{{previous definition}} |
| 14 | int g(void) { return 0; } // expected-error{{redefinition of a 'extern inline' function 'g' is not supported in C99 mode}} |