llvm/mlir
Mogball 67f0e8eec3 [mlir][ods] Fix verification of attribute + colon type ambiguity
An attribute without a type builder followed by a colon in an assembly format is potentially ambiguous because the parser will read ahead to parse the colon-type and pass this as the type argument to the attribute's constructor.

However, the previous verifier that checks for this ambiguity erroneously produces an error in the case of

```
let assemblyFormat = "( `(` $attr `)` )? `:`";
```

This patch fixes the bug by implementing a checker that correctly handles all edge cases, including very strange assembly formats like:

```
let assemblyFormat = "( `(` $attr ) : (`>`)? attr-dict (`>` $a^) : (`<`)? `:`";
```

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D125445
2022-05-16 21:15:27 +00:00
..
benchmark/python [mlir] Fix declaration of nano time function in benchmark infra 2022-05-13 13:22:18 +02:00
cmake/modules [mlir] Fix python bindings build on Windows in Debug 2022-05-09 19:46:47 -07:00
docs [mlir] Remove the type keyword from type alias definitions 2022-05-16 13:54:02 -07:00
examples [mlir:toy][NFC] Remove unnecessary trailing return type 2022-05-16 13:46:00 -04:00
include [mlir][transforms] Add a topological sort utility and pass 2022-05-16 20:47:30 +00:00
lib [mlir] Remove the type keyword from type alias definitions 2022-05-16 13:54:02 -07:00
python [mlir:ODS] Support using attributes in AllTypesMatch to automatically add InferTypeOpInterface 2022-04-28 12:57:59 -07:00
test [mlir][ods] Fix verification of attribute + colon type ambiguity 2022-05-16 21:15:27 +00:00
tools [mlir][ods] Fix verification of attribute + colon type ambiguity 2022-05-16 21:15:27 +00:00
unittests [ParseResult] Mark this as LLVM_NODISCARD (like LogicalResult) and fix issues. 2022-05-13 16:28:53 +01:00
utils [mlir] Remove the type keyword from type alias definitions 2022-05-16 13:54:02 -07:00
.clang-format
.clang-tidy
CMakeLists.txt [mlir][PDLL] Add support for generating PDL patterns from PDLL at build time 2022-04-26 18:33:16 -07:00
LICENSE.TXT
README.md

Multi-Level Intermediate Representation

See https://mlir.llvm.org/ for more information.