diff options
author | Daniel Dunbar <daniel@zuster.org> | 2008-11-19 11:54:05 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2008-11-19 11:54:05 +0000 |
commit | 371d16f45aeec61c1d07687f763d92137e133642 (patch) | |
tree | 9da3259a7fedb18e53dd7fd6c404d4efe0d03ef3 /lib/CodeGen/CGExprScalar.cpp | |
parent | 89e8a07af3e24ae0f843b80906422d711f73de0a (diff) |
Add spec ref to comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59622 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
-rw-r--r-- | lib/CodeGen/CGExprScalar.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index b236a6ad31..a8a40bef20 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -787,7 +787,9 @@ Value *ScalarExprEmitter::EmitCompoundAssign(const CompoundAssignOperator *E, Result = EmitScalarConversion(Result, ResultTy, LHSTy); // Store the result value into the LHS lvalue. Bit-fields are - // handled specially because the result is altered by the store. + // handled specially because the result is altered by the store, + // i.e., [C99 6.5.16p1] 'An assignment expression has the value of + // the left operand after the assignment...'. if (LHSLV.isBitfield()) CGF.EmitStoreThroughBitfieldLValue(RValue::get(Result), LHSLV, LHSTy, &Result); @@ -1003,7 +1005,9 @@ Value *ScalarExprEmitter::VisitBinAssign(const BinaryOperator *E) { Value *RHS = Visit(E->getRHS()); // Store the value into the LHS. Bit-fields are handled specially - // because the result is altered by the store. + // because the result is altered by the store, i.e., [C99 6.5.16p1] + // 'An assignment expression has the value of the left operand after + // the assignment...'. // FIXME: Volatility! if (LHS.isBitfield()) CGF.EmitStoreThroughBitfieldLValue(RValue::get(RHS), LHS, E->getType(), |