llvm-project/clang/test/Sema/block-return-1.c

7 lines
173 B
C

// RUN: %clang_cc1 -fsyntax-only %s -verify -fblocks
int j;
void foo() {
^ (void) { if (j) return 1; }(); // expected-error {{control may reach end of non-void block}}
}