return-noreturn.c revision 87e5732f3307c838fff6adea8ba50147110fe092
1// RUN: clang-cc %s -fsyntax-only -verify -fblocks -Wmissing-noreturn
2
3int j;
4void test1() { // expected-warning {{function could be attribute 'noreturn'}}
5  ^ (void) { while (1) { } }(); // expected-warning {{block could be attribute 'noreturn'}}
6  ^ (void) { if (j) while (1) { } }();
7  while (1) { }
8}
9
10void test2() {
11  if (j) while (1) { }
12}
13