Ted Kremenek | 8e282c3 | 2012-03-06 23:40:47 +0000 | [diff] [blame^] | 1 | // 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. |
| 5 | typedef signed char BOOL; |
| 6 | BOOL radar10989084() { |
| 7 | @autoreleasepool { // no-warning |
| 8 | return __objc_yes; |
| 9 | } |
| 10 | } |
| 11 | |
| 12 | // Test the warning works. |
| 13 | void test_unreachable() { |
| 14 | return; |
| 15 | return; // expected-warning {{will never be executed}} |
| 16 | } |
| 17 | |