[Mlir-commits] [mlir] [mlir][spirv][nfc] Refactor member decorations in StructType (PR #150218)
Jakub Kuderski
llvmlistbot at llvm.org
Wed Jul 23 09:31:29 PDT 2025
================
@@ -316,17 +316,18 @@ class StructType
friend bool operator==(const MemberDecorationInfo &lhs,
const MemberDecorationInfo &rhs) {
- return (lhs.memberIndex == rhs.memberIndex) &&
- (lhs.decoration == rhs.decoration) &&
- (lhs.decorationValue == rhs.decorationValue);
+ return lhs.memberIndex == rhs.memberIndex &&
+ lhs.decoration == rhs.decoration &&
+ lhs.decorationValue == rhs.decorationValue;
}
friend bool operator<(const MemberDecorationInfo &lhs,
const MemberDecorationInfo &rhs) {
return lhs.memberIndex < rhs.memberIndex ||
- (lhs.memberIndex == rhs.memberIndex &&
- llvm::to_underlying(lhs.decoration) <
- llvm::to_underlying(rhs.decoration));
+ std::make_tuple(lhs.memberIndex,
+ llvm::to_underlying(lhs.decoration)) <
+ std::make_tuple(rhs.memberIndex,
+ llvm::to_underlying(rhs.decoration));
----------------
kuhar wrote:
err, this should be `return std::tie(lhs.memberIndex, llvm::to_underlying(lhs.decoration) < std::tie(...)`
https://github.com/llvm/llvm-project/pull/150218
More information about the Mlir-commits
mailing list