From 8919447c71ab5940965fc2211c96f1f8b51d5da3 Mon Sep 17 00:00:00 2001 From: Javed Absar Date: Mon, 23 May 2022 14:48:57 +0100 Subject: [PATCH] [mlir] Fix warning `missing base in copy ctor` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This suppresse annoying warning when building mlir. ``` warning: base class ‘class mlir::PassWrapper<{anonymous}::TestStatisticPass, mlir::OperationPass >’ should be explicitly initialized in the copy constructor [-Wextra] ``` Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D126209 --- mlir/test/lib/Pass/TestPassManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mlir/test/lib/Pass/TestPassManager.cpp b/mlir/test/lib/Pass/TestPassManager.cpp index c19221d923e3..a61cfacb7cb0 100644 --- a/mlir/test/lib/Pass/TestPassManager.cpp +++ b/mlir/test/lib/Pass/TestPassManager.cpp @@ -62,7 +62,7 @@ struct TestOptionsPass llvm::cl::desc("Example string option")}; }; TestOptionsPass() = default; - TestOptionsPass(const TestOptionsPass &) {} + TestOptionsPass(const TestOptionsPass &) : PassWrapper() {} TestOptionsPass(const Options &options) { listOption = options.listOption; stringOption = options.stringOption; @@ -168,7 +168,7 @@ struct TestStatisticPass MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(TestStatisticPass) TestStatisticPass() = default; - TestStatisticPass(const TestStatisticPass &) {} + TestStatisticPass(const TestStatisticPass &) : PassWrapper() {} StringRef getArgument() const final { return "test-stats-pass"; } StringRef getDescription() const final { return "Test pass statistics"; }