r361098 - ScalarExprEmitter::EmitCompoundAssign - fix uninitialized variable warning. NFCI.

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Sat May 18 05:17:15 PDT 2019


Author: rksimon
Date: Sat May 18 05:17:15 2019
New Revision: 361098

URL: http://llvm.org/viewvc/llvm-project?rev=361098&view=rev
Log:
ScalarExprEmitter::EmitCompoundAssign - fix uninitialized variable warning. NFCI.

Modified:
    cfe/trunk/lib/CodeGen/CGExprScalar.cpp

Modified: cfe/trunk/lib/CodeGen/CGExprScalar.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprScalar.cpp?rev=361098&r1=361097&r2=361098&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprScalar.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprScalar.cpp Sat May 18 05:17:15 2019
@@ -2984,7 +2984,7 @@ LValue ScalarExprEmitter::EmitCompoundAs
 Value *ScalarExprEmitter::EmitCompoundAssign(const CompoundAssignOperator *E,
                       Value *(ScalarExprEmitter::*Func)(const BinOpInfo &)) {
   bool Ignore = TestAndClearIgnoreResultAssign();
-  Value *RHS;
+  Value *RHS = nullptr;
   LValue LHS = EmitCompoundAssignLValue(E, Func, RHS);
 
   // If the result is clearly ignored, return now.




More information about the cfe-commits mailing list