[llvm-commits] [llvm] r148639 - in /llvm/trunk/utils/unittest/googletest: gtest-death-test.cc gtest.cc include/gtest/internal/gtest-death-test-internal.h

David Blaikie dblaikie at gmail.com
Sat Jan 21 10:02:01 PST 2012


Author: dblaikie
Date: Sat Jan 21 12:02:01 2012
New Revision: 148639

URL: http://llvm.org/viewvc/llvm-project?rev=148639&view=rev
Log:
Remove unreachable defaults from gtest.

This will ensure LLVM and Clang build -Wswitch-enum-redundant-default (an on-by-default warning I'm about to add to Clang).

Modified:
    llvm/trunk/utils/unittest/googletest/gtest-death-test.cc
    llvm/trunk/utils/unittest/googletest/gtest.cc
    llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h

Modified: llvm/trunk/utils/unittest/googletest/gtest-death-test.cc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/gtest-death-test.cc?rev=148639&r1=148638&r2=148639&view=diff
==============================================================================
--- llvm/trunk/utils/unittest/googletest/gtest-death-test.cc (original)
+++ llvm/trunk/utils/unittest/googletest/gtest-death-test.cc Sat Jan 21 12:02:01 2012
@@ -527,7 +527,6 @@
       }
       break;
     case IN_PROGRESS:
-    default:
       GTEST_LOG_(FATAL)
           << "DeathTest::Passed somehow called before conclusion of test";
   }

Modified: llvm/trunk/utils/unittest/googletest/gtest.cc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/gtest.cc?rev=148639&r1=148638&r2=148639&view=diff
==============================================================================
--- llvm/trunk/utils/unittest/googletest/gtest.cc (original)
+++ llvm/trunk/utils/unittest/googletest/gtest.cc Sat Jan 21 12:02:01 2012
@@ -2480,8 +2480,6 @@
 #else
       return "Failure\n";
 #endif
-    default:
-      return "Unknown result type";
   }
 }
 

Modified: llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h?rev=148639&r1=148638&r2=148639&view=diff
==============================================================================
--- llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h (original)
+++ llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h Sat Jan 21 12:02:01 2012
@@ -207,8 +207,6 @@
           gtest_dt->Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); \
           break; \
         } \
-        default: \
-          break; \
       } \
     } \
   } else \





More information about the llvm-commits mailing list