1 // RUN: %clang_cc1 -fsyntax-only -verify %s -Wmissing-noreturn -Wreturn-type
2 void f() __attribute__((noreturn
));
4 template<typename T
> void g(T
) {
8 template void g
<int>(int);
10 template<typename T
> struct A
{
16 template struct A
<int>;
19 template<typename T
> void g(T
) {
24 template void B::g
<int>(int);
26 // We don't want a warning here.
28 virtual void g() { f(); }
34 // We don't want a warning here.
36 while (condition()) {}
41 // This test case previously had a false "missing return" warning.
43 R7880658
&operator++();
44 bool operator==(const R7880658
&) const;
45 bool operator!=(const R7880658
&) const;
48 void f_R7880658(R7880658 f
, R7880658 l
) { // no-warning
56 void *h() __attribute__((noreturn
));
63 A(int) : f(h()) { } // expected-warning {{function 'A' could be declared with attribute 'noreturn'}}
65 A(bool b
) : f(b
? h() : j()) { }
85 // Properly handle CFGs with destructors.
89 void rdar8875247_aux();
91 int rdar8875247_test() {
93 } // expected-warning{{non-void function does not return a value}}
95 struct rdar8875247_B
{
100 rdar8875247_B
test_rdar8875247_B() {
107 void wibble() __attribute((__noreturn__
));
114 template <typename T
> void thingy(T thing
) {