Skip to content

Commit a825cdb

Browse files
committed
Fix -Wparentheses build warning in asserts
1 parent e493c26 commit a825cdb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/SPIRV/SPIRVWriter.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -624,9 +624,9 @@ void LLVMToSPIRV::transVectorComputeMetadata(Function *F) {
624624
if (Attrs.hasAttribute(AttributeList::ReturnIndex,
625625
kVCMetadata::VCSingleElementVector)) {
626626
auto *RT = BF->getType();
627-
assert(RT->isTypeBool() || RT->isTypeFloat() || RT->isTypeInt() ||
628-
RT->isTypePointer() &&
629-
"This decoration is valid only for Scalar or Pointer types");
627+
assert((RT->isTypeBool() || RT->isTypeFloat() || RT->isTypeInt() ||
628+
RT->isTypePointer()) &&
629+
"This decoration is valid only for Scalar or Pointer types");
630630
BF->addDecorate(DecorationSingleElementVectorINTEL);
631631
}
632632

@@ -643,9 +643,9 @@ void LLVMToSPIRV::transVectorComputeMetadata(Function *F) {
643643
}
644644
if (Attrs.hasAttribute(ArgNo + 1, kVCMetadata::VCSingleElementVector)) {
645645
auto *AT = BA->getType();
646-
assert(AT->isTypeBool() || AT->isTypeFloat() || AT->isTypeInt() ||
647-
AT->isTypePointer() &&
648-
"This decoration is valid only for Scalar or Pointer types");
646+
assert((AT->isTypeBool() || AT->isTypeFloat() || AT->isTypeInt() ||
647+
AT->isTypePointer()) &&
648+
"This decoration is valid only for Scalar or Pointer types");
649649
BA->addDecorate(DecorationSingleElementVectorINTEL);
650650
}
651651
}

0 commit comments

Comments
 (0)