-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dialects: (builtin) verify that the elements of dense satisfy type (#…
…3544) Instead of scary doc string, warn the user at the point of DenseArrayBase parsing/creation.
- Loading branch information
1 parent
eaa9371
commit 9e66e8e
Showing
6 changed files
with
97 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// RUN: xdsl-opt %s --parsing-diagnostics --split-input-file | filecheck %s --strict-whitespace --match-full-lines | ||
|
||
// CHECK:"builtin.module" () {"test" = array<i32: "", 3>} ({ | ||
// CHECK-NEXT: ^^ | ||
// CHECK-NEXT: Expected integer literal | ||
"builtin.module" () {"test" = array<i32: "", 3>} ({ | ||
}) | ||
|
||
// ----- | ||
|
||
// CHECK:"builtin.module" () {"test" = array<()->(): 2, 5, 2>} ({ | ||
// CHECK-NEXT: ^^^^^^ | ||
// CHECK-NEXT: dense array element type must be an integer or floating point type | ||
"builtin.module" () {"test" = array<()->(): 2, 5, 2>} ({ | ||
}) | ||
|
||
// ----- | ||
|
||
// CHECK:"builtin.module" () {"test" = array<i8: 99999999, 255, 256>} ({ | ||
// CHECK-NEXT: ^^^^^^^^ | ||
// CHECK-NEXT: Integer value 99999999 is out of range for type i8 which supports values in the range [-128, 256) | ||
"builtin.module" () {"test" = array<i8: 99999999, 255, 256>} ({ | ||
}) |
6 changes: 0 additions & 6 deletions
6
tests/filecheck/dialects/builtin/dense_array_invalid_dims.mlir
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
tests/filecheck/dialects/builtin/dense_array_invalid_element.mlir
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters