minix/external/bsd/llvm/dist/clang/test/SemaObjC/warn-unreachable.m
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

17 lines
452 B
Objective-C

// RUN: %clang %s -fsyntax-only -Xclang -verify -fblocks -Wunreachable-code -Wno-unused-value -Wno-covered-switch-default
// This previously triggered a warning from -Wunreachable-code because of
// a busted CFG.
typedef signed char BOOL;
BOOL radar10989084() {
@autoreleasepool { // no-warning
return __objc_yes;
}
}
// Test the warning works.
void test_unreachable() {
return;
return; // expected-warning {{will never be executed}}
}