[cfe-commits] r72673 - in /cfe/trunk: lib/Sema/SemaExprCXX.cpp test/CodeGenCXX/new.cpp

Anders Carlsson andersca at mac.com
Sun May 31 14:53:10 PDT 2009


On May 31, 2009, at 2:52 PM, Sebastian Redl wrote:

> Anders Carlsson wrote:
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)
>> +++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Sun May 31 15:26:12 2009
>> @@ -508,6 +508,11 @@
>>       return true;
>>   }
>>
>> +  // FindAllocationOverload can change the passed in arguments, so  
>> we need to
>> +  // copy them back.
>> +  if (NumPlaceArgs > 0)
>> +    std::copy(&AllocArgs[1], AllocArgs.end(), PlaceArgs);
>> +
>>
> Why, so it can! I never thought about this.
> Hmm, now I wonder how many times I've made this mistake ...

:) Luckily we have good asserts that catch this in irgen.

Anders




More information about the cfe-commits mailing list