[PATCH] D113715: [mlir][ods] AttrOrTypeGen uses Class
River Riddle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 18 01:23:53 PST 2021
rriddle added inline comments.
================
Comment at: mlir/include/mlir/TableGen/Class.h:436-439
+inline constexpr mlir::tblgen::Method::Properties
+operator&(mlir::tblgen::Method::Properties lhs, bool rhs) {
+ return rhs ? lhs : mlir::tblgen::Method::None;
+}
----------------
rriddle wrote:
> Please remove this, the code that this creates is not readable.
In general, please avoid overloading operators like this. It creates code that is difficult to read/maintain just for the sake of saving a line or two. Prefer writing clean/readable code over "tricky" code.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113715/new/
https://reviews.llvm.org/D113715
More information about the llvm-commits
mailing list