YouCompleteMe/cpp/llvm/tools/clang/test/SemaObjC/warn-unreachable.m
Strahinja Val Markovic 1f51a89d39 Adding more llvm/clang files
These were ignored by git accidentally. We want ALL OF THEM since they all came
in the llvm/clang source distribution.
2012-07-05 17:55:45 -07:00

18 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}}
}