[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:23:17 PST 2012


On Sat, Jan 21, 2012 at 10:13 AM, Benjamin Kramer
<benny.kra at googlemail.com> wrote:
>
> 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

I hope so - though I was a little concerned about making this change
for precisely that reason. Chandler mentioned he was OK with this fix
& that he's one of the maintainers on Google Test, though he didn't
explicitly sign up/agree (or disagree) that this should go upstream
but I get the impression that would be the case. (+chandlerc to this
email so perhaps he can give his opinion/thought on the matter)

- David

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