forked from OSchip/llvm-project
Emit an error for missing '[' when parsing an AffineMapOfSSAIds.
Fixes tensorflow/mlir#51 PiperOrigin-RevId: 259415034
This commit is contained in:
parent
8b8caa888d
commit
40493a07a3
|
@ -2329,7 +2329,7 @@ ParseResult AffineParser::parseAffineMapOrIntegerSetInline(AffineMap &map,
|
|||
|
||||
/// Parse an AffineMap where the dim and symbol identifiers are SSA ids.
|
||||
ParseResult AffineParser::parseAffineMapOfSSAIds(AffineMap &map) {
|
||||
if (!consumeIf(Token::l_square))
|
||||
if (parseToken(Token::l_square, "expected '['"))
|
||||
return failure();
|
||||
|
||||
SmallVector<AffineExpr, 4> exprs;
|
||||
|
|
|
@ -142,3 +142,12 @@ func @affine_if_invalid_dimop_dim(%arg0: index, %arg1: index, %arg2: index, %arg
|
|||
}
|
||||
return
|
||||
}
|
||||
|
||||
// -----
|
||||
|
||||
func @affine_store_missing_l_square(%C: memref<4096x4096xf32>) {
|
||||
%9 = constant 0.0 : f32
|
||||
// expected-error@+1 {{expected '['}}
|
||||
affine.store %9, %C : memref<4096x4096xf32>
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue