diff --git a/mlir/include/mlir/TableGen/OpClass.h b/mlir/include/mlir/TableGen/OpClass.h --- a/mlir/include/mlir/TableGen/OpClass.h +++ b/mlir/include/mlir/TableGen/OpClass.h @@ -292,7 +292,7 @@ template OpConstructor(StringRef className, Property property, unsigned id, Args &&...args) - : OpMethod("", className, property, id, std::forward(args)...){}; + : OpMethod("", className, property, id, std::forward(args)...) {} // Add member initializer to constructor initializing `name` with `value`. void addMemberInitializer(StringRef name, StringRef value); @@ -366,7 +366,7 @@ template struct MethodCompare { bool operator()(const std::unique_ptr &x, - const std::unique_ptr &y) { + const std::unique_ptr &y) const { return x->getID() < y->getID(); } };