Skip to content

Commit 7974f12

Browse files
committed
[HLSL] Suppress a warning in #122820 [-Wunused-but-set-variable]
1 parent 84d4037 commit 7974f12

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

clang/lib/Sema/SemaHLSL.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@ static CXXRecordDecl *createHostLayoutStruct(Sema &S,
425425
// copy base struct, create HLSL Buffer compatible version if needed
426426
if (unsigned NumBases = StructDecl->getNumBases()) {
427427
assert(NumBases == 1 && "HLSL supports only one base type");
428+
(void)NumBases;
428429
CXXBaseSpecifier Base = *StructDecl->bases_begin();
429430
CXXRecordDecl *BaseDecl = Base.getType()->getAsCXXRecordDecl();
430431
if (requiresImplicitBufferLayoutStructure(BaseDecl)) {

0 commit comments

Comments
 (0)