As discussed in https://reviews.llvm.org/D140886, emitting a warning if the old API is used may be beneficial to encourage migration to the new fold API.
This reuse the existing Deprecated infrastructure within TableGen, and simply marks the def for kEmitRawAttributesFolder causing a use of it in a record (even if set within a base class) to emit a warning.
Error message as printed in the terminal:
Included from C:/llvm-project/mlir/python/mlir/dialects/TensorOps.td:13: Included from C:/llvm-project/mlir/include\mlir/Dialect/Tensor/IR/TensorOps.td:12: C:/llvm-project/mlir/include\mlir/Dialect/Tensor/IR/TensorBase.td:14:5: warning: Using deprecated def `kEmitRawAttributesFolder` def Tensor_Dialect : Dialect { ^ note: 'useFoldAPI' of 'kEmitRawAttributesFolder' (default) has been deprecated and is pending removal. Please switch to 'kEmitFoldAdaptorFolder'. See https://discourse.llvm.org/t/psa-new-improved-fold-method-signature-has-landed-please-update-your-downstream-projects/67618
Depends on https://reviews.llvm.org/D141530 (to not emit warnings in tree)
If accepted I'd probably not land this for a week or two (since the new fold has only just landed) to give people more time before emitting warnings.
We may need new diagram of which include is more abstract than which :-) (this base is higher than that base). Not due to you or blocker here.