Skip to content

Commit fec7c92

Browse files
committed
use signed for arithemtic & avoid copy
1 parent 37682e7 commit fec7c92

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

mlir/include/mlir/Query/Matcher/Marshallers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ class VariadicOperatorMatcherDescriptor : public MatcherDescriptor {
177177
}
178178

179179
std::vector<VariantMatcher> innerArgs;
180-
for (size_t i = 0, e = args.size(); i != e; ++i) {
180+
for (int64_t i = 0, e = args.size(); i != e; ++i) {
181181
const ParserValue &arg = args[i];
182182
const VariantValue &value = arg.value;
183183
if (!value.isMatcher()) {

mlir/include/mlir/Query/Matcher/MatchersInternal.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ using VariadicOperatorFunction = bool (*)(Operation *op,
102102
template <VariadicOperatorFunction Func>
103103
class VariadicMatcher : public MatcherInterface {
104104
public:
105-
VariadicMatcher(std::vector<DynMatcher> matchers) : matchers(matchers) {}
105+
VariadicMatcher(std::vector<DynMatcher> matchers)
106+
: matchers(std::move(matchers)) {}
106107

107108
bool match(Operation *op) override { return Func(op, nullptr, matchers); }
108109
bool match(Operation *op, SetVector<Operation *> &matchedOps) override {

0 commit comments

Comments
 (0)