[cfe-commits] r43365 - in /cfe/trunk: CodeGen/CGExprScalar.cpp test/CodeGen/compound.c
Devang Patel
dpatel at apple.com
Tue Oct 30 11:31:43 PDT 2007
On Oct 30, 2007, at 11:26 AM, Chris Lattner wrote:
>
> On Oct 25, 2007, at 3:19 PM, Devang Patel wrote:
>
>> Author: dpatel
>> Date: Thu Oct 25 17:19:13 2007
>> New Revision: 43365
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=43365&view=rev
>> Log:
>> Fix "strbuf += stufflen;" crash.
>
> Cool.
>
>> @@ -618,8 +618,10 @@
>> // Convert the LHS/RHS values to the computation type.
>> OpInfo.LHS = EmitScalarConversion(OpInfo.LHS, LHSTy, ComputeType);
>>
>> - // Do not merge types for -= where the LHS is a pointer.
>> - if (E->getOpcode() != BinaryOperator::SubAssign ||
>> + // Do not merge types for -= or += where the LHS is a pointer.
>> + if (!(E->getOpcode() == BinaryOperator::SubAssign ||
>> + E->getOpcode() == BinaryOperator::AddAssign) ||
>> + // if (E->getOpcode() != BinaryOperator::SubAssign ||
>> !E->getLHS()->getType()->isPointerType()) {
>> OpInfo.RHS = EmitScalarConversion(OpInfo.RHS, RHSTy,
>> ComputeType);
>
> Please remove the commented out line of code and indent the previous
> line more nicely :)
Oops.
Fixed.
-
Devang
More information about the cfe-commits
mailing list