Add parentheses around boolean operators in assert

This removes a warning and is generally a good practice.

PiperOrigin-RevId: 272613597
This commit is contained in:
Alex Zinenko 2019-10-03 01:46:39 -07:00 committed by A. Unique TensorFlower
parent e0d78eac23
commit bd4762502c
1 changed files with 3 additions and 2 deletions

View File

@ -659,8 +659,9 @@ struct AllocOpLowering : public LLVMLegalizationPattern<AllocOp> {
"unexpected dynamic offset");
// 0-D memref corner case: they have size 1 ...
assert((type.getRank() == 0 && strides.empty() && sizes.size() == 1) ||
(strides.size() == sizes.size()) && "unexpected number of strides");
assert(((type.getRank() == 0 && strides.empty() && sizes.size() == 1) ||
(strides.size() == sizes.size())) &&
"unexpected number of strides");
// Create the MemRef descriptor.
auto structType = lowering.convertType(type);