зеркало из https://github.com/microsoft/clang-1.git
The new correct compound assignment operators exposed a bug in codegen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41405 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
8702a0f0cd
Коммит
3b44b57423
|
@ -430,8 +430,8 @@ Value *ScalarExprEmitter::EmitCompoundAssign(const BinaryOperator *E,
|
||||||
ComputeType).getVal();
|
ComputeType).getVal();
|
||||||
|
|
||||||
// Do not merge types for -= where the LHS is a pointer.
|
// Do not merge types for -= where the LHS is a pointer.
|
||||||
if (E->getOpcode() != BinaryOperator::SubAssign &&
|
if (E->getOpcode() != BinaryOperator::SubAssign ||
|
||||||
E->getLHS()->getType()->isPointerType()) {
|
!E->getLHS()->getType()->isPointerType()) {
|
||||||
OpInfo.RHS = CGF.EmitConversion(RValue::get(OpInfo.RHS), RHSTy,
|
OpInfo.RHS = CGF.EmitConversion(RValue::get(OpInfo.RHS), RHSTy,
|
||||||
ComputeType).getVal();
|
ComputeType).getVal();
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче