brintos

brintos / llvm-project-archived public Read only

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