[Mlir-commits] [mlir] 719548d - Fix gcc warning by explicitly initializing the base class copy ctor (NFC)

Mehdi Amini llvmlistbot at llvm.org
Sun Aug 30 10:49:44 PDT 2020


Author: Mehdi Amini
Date: 2020-08-30T17:46:51Z
New Revision: 719548d63d9f906b3b0e0e7d7681a9bfa1d3d8cf

URL: https://github.com/llvm/llvm-project/commit/719548d63d9f906b3b0e0e7d7681a9bfa1d3d8cf
DIFF: https://github.com/llvm/llvm-project/commit/719548d63d9f906b3b0e0e7d7681a9bfa1d3d8cf.diff

LOG: Fix gcc warning by explicitly initializing the base class copy ctor (NFC)

Full diagnostic was:

warning: base class ‘class mlir::OptReductionBase<mlir::OptReductionPass>’ should be explicitly initialized in the copy constructor [-Wextra]

Added: 
    

Modified: 
    mlir/tools/mlir-reduce/OptReductionPass.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/tools/mlir-reduce/OptReductionPass.cpp b/mlir/tools/mlir-reduce/OptReductionPass.cpp
index fbc3053aa826..2ad55e948618 100644
--- a/mlir/tools/mlir-reduce/OptReductionPass.cpp
+++ b/mlir/tools/mlir-reduce/OptReductionPass.cpp
@@ -23,7 +23,8 @@ OptReductionPass::OptReductionPass(const Tester &test, MLIRContext *context,
     : context(context), test(test), optPass(std::move(optPass)) {}
 
 OptReductionPass::OptReductionPass(const OptReductionPass &srcPass)
-    : test(srcPass.test), optPass(srcPass.optPass.get()) {}
+    : OptReductionBase<OptReductionPass>(srcPass), test(srcPass.test),
+      optPass(srcPass.optPass.get()) {}
 
 /// Runs the pass instance in the pass pipeline.
 void OptReductionPass::runOnOperation() {


        


More information about the Mlir-commits mailing list