]> granicus.if.org Git - clang/commitdiff
Add spec ref to comment.
authorDaniel Dunbar <daniel@zuster.org>
Wed, 19 Nov 2008 11:54:05 +0000 (11:54 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Wed, 19 Nov 2008 11:54:05 +0000 (11:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59622 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGExprScalar.cpp

index b236a6ad31ebcbd71f9a7223da5bdbaba3929098..a8a40bef20572d739cc7bfaa40cce91463a2e273 100644 (file)
@@ -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(),