[flang-commits] [flang] 302a6eb - [flang] Remove unused variable 'nullBoxTy' in ConvertExpr.cpp (NFC)

Jie Fu via flang-commits flang-commits at lists.llvm.org
Fri Mar 31 00:30:56 PDT 2023


Author: Jie Fu
Date: 2023-03-31T15:30:46+08:00
New Revision: 302a6ebc899ae7cf1629378d8511cf4220656857

URL: https://github.com/llvm/llvm-project/commit/302a6ebc899ae7cf1629378d8511cf4220656857
DIFF: https://github.com/llvm/llvm-project/commit/302a6ebc899ae7cf1629378d8511cf4220656857.diff

LOG: [flang] Remove unused variable 'nullBoxTy' in ConvertExpr.cpp (NFC)

/data/llvm-project/flang/lib/Lower/ConvertExpr.cpp:728:10: error: unused variable 'nullBoxTy' [-Werror,-Wunused-variable]
    auto nullBoxTy = builder.getRefType(fir::BoxType::get(noneTy));
         ^
1 error generated.

Added: 
    

Modified: 
    flang/lib/Lower/ConvertExpr.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Lower/ConvertExpr.cpp b/flang/lib/Lower/ConvertExpr.cpp
index becaf13dd3ec..9563911853a6 100644
--- a/flang/lib/Lower/ConvertExpr.cpp
+++ b/flang/lib/Lower/ConvertExpr.cpp
@@ -725,7 +725,6 @@ class ScalarExprLowering {
         builder.createTemporary(loc, boxType, /*shape=*/mlir::ValueRange{});
     mlir::Value nullBox = builder.create<fir::EmboxOp>(loc, boxType, nullConst);
     builder.create<fir::StoreOp>(loc, nullBox, tempBox);
-    auto nullBoxTy = builder.getRefType(fir::BoxType::get(noneTy));
     return fir::MutableBoxValue(tempBox,
                                 /*lenParameters=*/mlir::ValueRange{},
                                 /*mutableProperties=*/{});


        


More information about the flang-commits mailing list