Skip to content

Commit 98a88c1

Browse files
committed
[mlir] Add parenthesis to avoid -Wparentheses
1 parent 6962eea commit 98a88c1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mlir/include/mlir/IR/UseDefLists.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ template <typename OperandType> class IRObjectWithUseList {
4747
/// the IR that uses 'this' to use the other value instead. When this returns
4848
/// there are zero uses of 'this'.
4949
void replaceAllUsesWith(typename OperandType::ValueType newValue) {
50-
assert(!newValue || this != OperandType::getUseList(newValue) &&
51-
"cannot RAUW a value with itself");
50+
assert((!newValue || this != OperandType::getUseList(newValue)) &&
51+
"cannot RAUW a value with itself");
5252
while (!use_empty())
5353
use_begin()->set(newValue);
5454
}
@@ -126,8 +126,8 @@ class IRMultiObjectWithUseList : public IRObjectWithUseList<OperandType> {
126126
void replaceAllUsesWith(ValueType oldValue, ValueType newValue) {
127127
assert(this == OperandType::getUseList(oldValue) &&
128128
"value not attached to this use list");
129-
assert(!newValue || this != OperandType::getUseList(newValue) &&
130-
"cannot RAUW a value with itself");
129+
assert((!newValue || this != OperandType::getUseList(newValue)) &&
130+
"cannot RAUW a value with itself");
131131
for (OperandType &use : llvm::make_early_inc_range(getUses(oldValue)))
132132
use.set(newValue);
133133
}

0 commit comments

Comments
 (0)