You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[MLIR] Imporve location tracking for parseElementsLiteralType (#127992)
This commit improves line location tracking in case of error reporting
to the user in `parseElementsLiteralType`. There are two cases: the type
is already parsed [1] or not yet parsed [2]. With these changes we print
the error at the attribute's location in both cases to ensure
consistency.
Case 1)
```mlir
memref<i32> = dense<[3]>
^
```
Case 2)
```mlir
dense<[3]> : memref<i32>
^
```
Note that today for a simple:
```mlir
func.func @main() {
%0 = arith.constant dense<[3]> : i32
return
}
```
we print the error after the constant:
```
./bin/c.mlir:3:3: error: elements literal must be a shaped type
return
^
```
0 commit comments