[cfe-commits] r121961 - /cfe/trunk/test/SemaCXX/warn-unreachable.cpp

Ted Kremenek kremenek at apple.com
Thu Dec 16 00:22:16 PST 2010


Author: kremenek
Date: Thu Dec 16 02:22:16 2010
New Revision: 121961

URL: http://llvm.org/viewvc/llvm-project?rev=121961&view=rev
Log:
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.

Modified:
    cfe/trunk/test/SemaCXX/warn-unreachable.cpp

Modified: cfe/trunk/test/SemaCXX/warn-unreachable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/warn-unreachable.cpp?rev=121961&r1=121960&r2=121961&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/warn-unreachable.cpp (original)
+++ cfe/trunk/test/SemaCXX/warn-unreachable.cpp Thu Dec 16 02:22:16 2010
@@ -39,8 +39,10 @@
 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}}





More information about the cfe-commits mailing list