remove an useless allocation found by scan-build - the new Dead nested assignment...
authorSylvestre Ledru <sylvestre@debian.org>
Sat, 12 Oct 2019 15:24:00 +0000 (15:24 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Sat, 12 Oct 2019 15:24:00 +0000 (15:24 +0000)
llvm-svn: 374659

clang/lib/CodeGen/CGExprScalar.cpp

index c7f279d..f3e03be 100644 (file)
@@ -4413,8 +4413,8 @@ Value *ScalarExprEmitter::VisitAsTypeExpr(AsTypeExpr *E) {
     return Src;
   }
 
-  return Src = createCastsForTypeOfSameSize(Builder, CGF.CGM.getDataLayout(),
-                                            Src, DstTy, "astype");
+  return createCastsForTypeOfSameSize(Builder, CGF.CGM.getDataLayout(),
+                                      Src, DstTy, "astype");
 }
 
 Value *ScalarExprEmitter::VisitAtomicExpr(AtomicExpr *E) {