xref: /llvm-project/mlir/test/mlir-tblgen/deprecation.td (revision e4fb75a354740bf45dab0ebd43f37ab2fdeae3bf)
1// RUN: not mlir-tblgen -on-deprecated=error -gen-op-decls -I %S/../../include -DERROR1 %s 2>&1 | FileCheck --check-prefix=ERROR1 %s
2
3include "mlir/IR/OpBase.td"
4
5def Test_Dialect : Dialect {
6  let name = "test_dialect";
7}
8
9#ifdef ERROR1
10def OpTraitA : NativeOpTrait<"OpTraitA">, Deprecated<"use `bar` instead">;
11
12// ERROR1: warning: Using deprecated def `OpTraitA`
13// ERROR1: use `bar` instead
14def OpTraitWithoutDependentTrait : Op<Test_Dialect, "default_value", [OpTraitA]> {}
15#endif
16