aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-12-16 08:22:16 +0000
committerTed Kremenek <kremenek@apple.com>2010-12-16 08:22:16 +0000
commit7dd3c73b7d984d5cd6e0d94e5016ebed03bddfdf (patch)
tree22f2347e4db3e37784260c918d4f1c77eb96e9c8
parent892697dd2287caf7c29aaaa82909b0e90b8b63fe (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121961 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/SemaCXX/warn-unreachable.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/SemaCXX/warn-unreachable.cpp b/test/SemaCXX/warn-unreachable.cpp
index f5601cd2df..79af562980 100644
--- a/test/SemaCXX/warn-unreachable.cpp
+++ b/test/SemaCXX/warn-unreachable.cpp
@@ -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}}