blob: 832cbd23d27e80edb84792f49ead7d33bd6fa3ba [file] [log] [blame]
Ted Kremenek8e282c32012-03-06 23:40:47 +00001// RUN: %clang %s -fsyntax-only -Xclang -verify -fblocks -Wunreachable-code -Wno-unused-value -Wno-covered-switch-default
2
3// This previously triggered a warning from -Wunreachable-code because of
4// a busted CFG.
5typedef signed char BOOL;
6BOOL radar10989084() {
7 @autoreleasepool { // no-warning
8 return __objc_yes;
9 }
10}
11
12// Test the warning works.
13void test_unreachable() {
14 return;
15 return; // expected-warning {{will never be executed}}
16}
17