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 // <rdar://problem/7880658> - This test case previously had a false "missing return"
44 R7880658
&operator++();
45 bool operator==(const R7880658
&) const;
46 bool operator!=(const R7880658
&) const;
49 void f_R7880658(R7880658 f
, R7880658 l
) { // no-warning
57 void *h() __attribute__((noreturn
));
64 A(int) : f(h()) { } // expected-warning {{function 'A' could be declared with attribute 'noreturn'}}
66 A(bool b
) : f(b
? h() : j()) { }
86 // <rdar://problem/8875247> - Properly handle CFGs with destructors.
90 void rdar8875247_aux();
92 int rdar8875247_test() {
94 } // expected-warning{{non-void function does not return a value}}
96 struct rdar8875247_B
{
101 rdar8875247_B
test_rdar8875247_B() {
108 void wibble() __attribute((__noreturn__
));
115 template <typename T
> void thingy(T thing
) {