[Mlir-commits] [mlir] 8919447 - [mlir] Fix warning `missing base in copy ctor`
Javed Absar
llvmlistbot at llvm.org
Wed May 25 02:24:24 PDT 2022
Author: Javed Absar
Date: 2022-05-25T10:24:00+01:00
New Revision: 8919447c71ab5940965fc2211c96f1f8b51d5da3
URL: https://github.com/llvm/llvm-project/commit/8919447c71ab5940965fc2211c96f1f8b51d5da3
DIFF: https://github.com/llvm/llvm-project/commit/8919447c71ab5940965fc2211c96f1f8b51d5da3.diff
LOG: [mlir] Fix warning `missing base in copy ctor`
This suppresse annoying warning when building mlir.
```
warning: base class ‘class mlir::PassWrapper<{anonymous}::TestStatisticPass,
mlir::OperationPass<void> >’ should be explicitly initialized in the copy constructor [-Wextra]
```
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D126209
Added:
Modified:
mlir/test/lib/Pass/TestPassManager.cpp
Removed:
################################################################################
diff --git a/mlir/test/lib/Pass/TestPassManager.cpp b/mlir/test/lib/Pass/TestPassManager.cpp
index c19221d923e3f..a61cfacb7cb09 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"; }
More information about the Mlir-commits
mailing list