[libcxx] r233816 - Remove statement with no effect inside tests.

Eric Fiselier eric at efcs.ca
Wed Apr 1 18:23:36 PDT 2015


I don't think it should be `++ delete_nothrow_called` because the
nothrow version of delete wasn't called and the test fails if you
increment delete_nothrow_called.

Is there something I am missing?

/Eric

On Wed, Apr 1, 2015 at 5:52 PM, Marshall Clow <mclow.lists at gmail.com> wrote:
> On Wed, Apr 1, 2015 at 11:28 AM, Jonathan Roelofs
> <jonathan at codesourcery.com> wrote:
>>
>>
>>
>> On 4/1/15 9:49 AM, Eric Fiselier wrote:
>>>
>>> Author: ericwf
>>> Date: Wed Apr  1 10:49:02 2015
>>> New Revision: 233816
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=233816&view=rev
>>> Log:
>>> Remove statement with no effect inside tests.
>>>
>>> Modified:
>>>
>>> libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array.pass.cpp
>>>
>>> libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete.pass.cpp
>>>
>>> Modified:
>>> libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array.pass.cpp
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array.pass.cpp?rev=233816&r1=233815&r2=233816&view=diff
>>>
>>> ==============================================================================
>>> ---
>>> libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array.pass.cpp
>>> (original)
>>> +++
>>> libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array.pass.cpp
>>> Wed Apr  1 10:49:02 2015
>>> @@ -23,7 +23,6 @@ int delete_nothrow_called = 0;
>>>   void operator delete[](void* p) throw()
>>>   {
>>>       ++delete_called;
>>> -    delete_nothrow_called;
>>
>> Maybe the intent there was to assert something about that, or assign to
>> it?
>>
>> Jon
>>>
>>>       std::free(p);
>>>   }
>>>
>>>
>>> Modified:
>>> libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete.pass.cpp
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete.pass.cpp?rev=233816&r1=233815&r2=233816&view=diff
>>>
>>> ==============================================================================
>>> ---
>>> libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete.pass.cpp
>>> (original)
>>> +++
>>> libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete.pass.cpp
>>> Wed Apr  1 10:49:02 2015
>>> @@ -23,7 +23,6 @@ int delete_nothrow_called = 0;
>>>   void operator delete(void* p) throw()
>>>   {
>>>       ++delete_called;
>>> -    delete_nothrow_called;
>>>       std::free(p);
>>>   }
>>>
>
> I suspect the line you deleted was supposed to be
>
>   ++ delete_nothrow_called;
>
> -- Marshall
>



More information about the cfe-commits mailing list