Skip to content

Commit 7cfab6c

Browse files
authored
[HLSL] add parentheses in assertion to eliminate -Wparentheses warning (#128246)
Fixes #128210
1 parent aef63c5 commit 7cfab6c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang/lib/CodeGen/HLSLBufferLayoutBuilder.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ llvm::TargetExtType *HLSLBufferLayoutBuilder::createLayoutType(
8989
RecordTypes.pop_back();
9090

9191
for (const auto *FD : RT->getDecl()->fields()) {
92-
assert(!Packoffsets || Index < Packoffsets->size() &&
93-
"number of elements in layout struct does not "
94-
"match number of packoffset annotations");
92+
assert((!Packoffsets || Index < Packoffsets->size()) &&
93+
"number of elements in layout struct does not "
94+
"match number of packoffset annotations");
9595

9696
if (!layoutField(FD, EndOffset, Layout, LayoutElements,
9797
Packoffsets ? (*Packoffsets)[Index] : -1))

0 commit comments

Comments
 (0)