[all-commits] [llvm/llvm-project] 3a8db0: [mlir] Reduce warnings for bad assertion in genera...

Valentin Clement (バレンタイン クレメン) via All-commits all-commits at lists.llvm.org
Tue Aug 1 14:57:46 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3a8db0f4bfb57348f49d9603119fa157114bbf8e
      https://github.com/llvm/llvm-project/commit/3a8db0f4bfb57348f49d9603119fa157114bbf8e
  Author: Valentin Clement <clementval at gmail.com>
  Date:   2023-08-01 (Tue, 01 Aug 2023)

  Changed paths:
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

  Log Message:
  -----------
  [mlir] Reduce warnings for bad assertion in generated code

When the operation has no attributes, the generated assertion is
always false and triggers lots of warnings in the build.

```
warning: comparison of unsigned expression < 0 is always false
```

Just return a StringAttr when there is no attribute.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D156819




More information about the All-commits mailing list