| 1 |
// RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 |
|
| 3 |
void f0() { // expected-note {{previous definition is here}} |
| 4 |
} |
| 5 |
|
| 6 |
inline void f0(); // expected-error {{inline declaration of 'f0' follows non-inline definition}} |
| 7 |
|
| 8 |
void func_01() {} // expected-note{{previous definition is here}} |
| 9 |
struct C01 { |
| 10 |
friend void func_01() {} // expected-error{{redefinition of 'func_01'}} |
| 11 |
}; |
| 12 |
|
| 13 |
void func_02() {} // expected-note{{previous definition is here}} |
| 14 |
struct C02 { |
| 15 |
friend inline void func_02(); // expected-error{{inline declaration of 'func_02' follows non-inline definition}} |
| 16 |
}; |
| 17 |
|
| 18 |
void func_03() {} // expected-note{{previous definition is here}} |
| 19 |
struct C03 { |
| 20 |
friend inline void func_03() {} // expected-error{{inline declaration of 'func_03' follows non-inline definition}} |
| 21 |
}; |
| 22 |
|
| 23 |
void func_04() {} // expected-note{{previous definition is here}} |
| 24 |
inline void func_04() {} // expected-error{{inline declaration of 'func_04' follows non-inline definition}} |
| 25 |
|
| 26 |
void func_06() {} // expected-note{{previous definition is here}} |
| 27 |
template<typename T> struct C06 { |
| 28 |
friend inline void func_06() {} // expected-error{{inline declaration of 'func_06' follows non-inline definition}} |
| 29 |
}; |
| 30 |
|
| 31 |
void func_07() {} // expected-note{{previous definition is here}} |
| 32 |
template<typename T> struct C07 { |
| 33 |
friend inline void func_07(); // expected-error{{inline declaration of 'func_07' follows non-inline definition}} |
| 34 |
}; |