[llvm-commits] [llvm] r101689 - /llvm/trunk/unittests/ADT/ValueMapTest.cpp

Chris Lattner sabre at nondot.org
Sun Apr 18 21:19:45 PDT 2010


On Apr 18, 2010, at 9:08 PM, Daniel Dunbar wrote:

> These are Clang bugs, right?

I don't know, are they?  They are unused, and the ctor/dtor pair has no side effects.

-Chris

> 
> - Daniel
> 
> On Sat, Apr 17, 2010 at 8:28 PM, Chris Lattner <sabre at nondot.org> wrote:
>> Author: lattner
>> Date: Sat Apr 17 22:28:20 2010
>> New Revision: 101689
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=101689&view=rev
>> Log:
>> silence some unused-value warnings.
>> 
>> Modified:
>>    llvm/trunk/unittests/ADT/ValueMapTest.cpp
>> 
>> Modified: llvm/trunk/unittests/ADT/ValueMapTest.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/ValueMapTest.cpp?rev=101689&r1=101688&r2=101689&view=diff
>> ==============================================================================
>> --- llvm/trunk/unittests/ADT/ValueMapTest.cpp (original)
>> +++ llvm/trunk/unittests/ADT/ValueMapTest.cpp Sat Apr 17 22:28:20 2010
>> @@ -61,9 +61,9 @@
>> 
>>  TYPED_TEST(ValueMapTest, OperationsWork) {
>>   ValueMap<TypeParam*, int> VM;
>> -  ValueMap<TypeParam*, int> VM2(16);
>> +  ValueMap<TypeParam*, int> VM2(16);  (void)VM2;
>>   typename ValueMapConfig<TypeParam*>::ExtraData Data;
>> -  ValueMap<TypeParam*, int> VM3(Data, 16);
>> +  ValueMap<TypeParam*, int> VM3(Data, 16);  (void)VM3;
>>   EXPECT_TRUE(VM.empty());
>> 
>>   VM[this->BitcastV.get()] = 7;
>> @@ -128,7 +128,7 @@
>>   for (typename ValueMap<TypeParam*, int>::iterator I = VM.begin(), E = VM.end();
>>        I != E; ++I) {
>>     ++size;
>> -    std::pair<TypeParam*, int> value = *I;
>> +    std::pair<TypeParam*, int> value = *I; (void)value;
>>     CompileAssertHasType<TypeParam*>(I->first);
>>     if (I->second == 2) {
>>       EXPECT_EQ(this->BitcastV.get(), I->first);
>> @@ -150,7 +150,7 @@
>>   for (typename ValueMap<TypeParam*, int>::const_iterator I = CVM.begin(),
>>          E = CVM.end(); I != E; ++I) {
>>     ++size;
>> -    std::pair<TypeParam*, int> value = *I;
>> +    std::pair<TypeParam*, int> value = *I;  (void)value;
>>     CompileAssertHasType<TypeParam*>(I->first);
>>     if (I->second == 5) {
>>       EXPECT_EQ(this->BitcastV.get(), I->first);
>> 
>> 
>> _______________________________________________
>> 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