[libcxx] r233816 - Remove statement with no effect inside tests.
Jonathan Roelofs
jonathan at codesourcery.com
Wed Apr 1 18:49:06 PDT 2015
On 4/1/15 7:23 PM, Eric Fiselier wrote:
> 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?
Now that I've actually looked at the test, I think it would pass if it
was `assert(!delete_nothrow_called);`, but what' you've got in there now
is just as good... so nevermind.
Jon
>
> /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
>>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
--
Jon Roelofs
jonathan at codesourcery.com
CodeSourcery / Mentor Embedded
More information about the cfe-commits
mailing list