summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/block-return-1.c
blob: ddb70e2ef643eced2a24cd66e8ccd1250e9893b0 (plain)
1
2
3
4
5
6
// RUN: %clang_cc1 -fsyntax-only %s -verify -fblocks

int j;
void foo() {
  ^ (void) { if (j) return 1; }(); // expected-error {{non-void block does not return a value in all control paths}}
}
OpenPOWER on IntegriCloud