Skip to content

Commit 6ed4310

Browse files
committed
Apply clang-tidy fixes for readability-simplify-boolean-expr in SPIRVToLLVM.cpp (NFC)
1 parent 98615fd commit 6ed4310

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ static Optional<Type> convertArrayType(spirv::ArrayType type,
252252
unsigned stride = type.getArrayStride();
253253
Type elementType = type.getElementType();
254254
auto sizeInBytes = elementType.cast<spirv::SPIRVType>().getSizeInBytes();
255-
if (stride != 0 && !(sizeInBytes && *sizeInBytes == stride))
255+
if (stride != 0 && (!sizeInBytes || *sizeInBytes != stride))
256256
return llvm::None;
257257

258258
auto llvmElementType = converter.convertType(elementType);

0 commit comments

Comments
 (0)