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

Benjamin Kramer benny.kra at googlemail.com
Sat Jan 21 10:13:07 PST 2012


On 21.01.2012, at 19:02, David Blaikie wrote:

> 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).

Hi David,

Can we get this upstreamed to the googletest project? It will ease merging new versions in the future.

- Ben


> 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 \
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list