Tweak location of diagnostic for -Wunreachable-code

test due to recent changes to the CFG.  The
diagnostic is somewhat in the wrong place, but
the -Wunreachable-code diagnostic needs to be
revamped anyway since most of the diagnostics
in this test case are redundant.

llvm-svn: 121961
This commit is contained in:
Ted Kremenek 2010-12-16 08:22:16 +00:00
parent 8219b82125
commit f8e4b48b3d
1 changed files with 4 additions and 2 deletions

View File

@ -39,8 +39,10 @@ void test2() {
void test3() {
halt()
--; // expected-warning {{will never be executed}}
halt()
? // expected-warning {{will never be executed}}
// FIXME: The unreachable part is just the '?', but really all of this
// code is unreachable and shouldn't be separately reported.
halt() // expected-warning {{will never be executed}}
?
dead() : dead();
live(),
float // expected-warning {{will never be executed}}