1 // RUN: %clang_cc1 -fsyntax-only -triple i686-pc-win32 -verify -std=c++11 %s
5 inline void f(); // expected-warning{{inline function 'test1::f' is not defined}}
6 void test() { f(); } // expected-note{{used here}}
11 void test() { (void)sizeof(f()); }
15 void f(); // expected-warning{{inline function 'test3::f' is not defined}}
17 void test() { f(); } // expected-note{{used here}}
21 inline void error_on_zero(int); // expected-warning{{inline function 'test4::error_on_zero' is not defined}}
22 inline void error_on_zero(char*) {}
23 void test() { error_on_zero(0); } // expected-note{{used here}}
27 struct X
{ void f(); };
28 void test(X
&x
) { x
.f(); }
32 struct X
{ inline void f(); }; // expected-warning{{inline function 'test6::X::f' is not defined}}
33 void test(X
&x
) { x
.f(); } // expected-note{{used here}}
37 void f(); // expected-warning{{inline function 'test7::f' is not defined}}
38 void test() { f(); } // no used-here note.
43 inline void foo() __attribute__((gnu_inline
)); // expected-warning {{'gnu_inline' attribute without 'extern' in C++ treated as externally available, this changed in Clang 10}}
44 void test() { foo(); }
49 void test() { foo(); }
50 inline void foo() __attribute__((gnu_inline
)); // expected-warning {{'gnu_inline' attribute without 'extern' in C++ treated as externally available, this changed in Clang 10}}
55 void test() { foo(); }
56 inline void foo() __attribute__((gnu_inline
)); // expected-warning {{'gnu_inline' attribute without 'extern' in C++ treated as externally available, this changed in Clang 10}}
60 inline void foo() __attribute__((dllexport
));
61 inline void bar() __attribute__((dllimport
));
62 void test() { foo(); bar(); }
66 template<typename
> constexpr int _S_chk(int *);
67 decltype(_S_chk
<int>(nullptr)) n
;