Skip to content

Commit fce2ca0

Browse files
committed
oops, silly bug
1 parent 6d3909e commit fce2ca0

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

mlir/lib/Dialect/IRDL/IR/IRDL.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ LogicalResult OperationOp::verifyRegions() {
107107
// Verify that no two operand, result or region share the same name.
108108
for (size_t i : llvm::seq(valueNames.size())) {
109109
for (size_t j : llvm::seq(i + 1, valueNames.size())) {
110-
auto &[lhs, lhsSet] = valueNames[i];
110+
auto [lhs, lhsSet] = valueNames[i];
111111
auto &[rhs, rhsSet] = valueNames[j];
112112
llvm::set_intersect(lhsSet, rhsSet);
113113
if (!lhsSet.empty())

mlir/test/Dialect/IRDL/invalid.irdl.mlir

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,19 @@ irdl.dialect @testd {
117117

118118
// -----
119119

120+
irdl.dialect @testd {
121+
// expected-error@+1 {{contains a value named 'baz' for both its regions and results}}
122+
irdl.operation @op {
123+
%0 = irdl.any
124+
%1 = irdl.region
125+
irdl.regions(baz: %1)
126+
irdl.operands(qux: %0)
127+
irdl.results(baz: %0)
128+
}
129+
}
130+
131+
// -----
132+
120133
irdl.dialect @testd {
121134
irdl.type @type {
122135
// expected-error@+1 {{symbol '@foo' not found}}

0 commit comments

Comments
 (0)