Skip to content

Commit 5cb6faa

Browse files
authored
[NFC] Fix incorrect use of UNREFERENCED_PARAMETER macro (microsoft#6806)
In CalcResTypeSize function, UNREFERENCED_PARAMETER macro is used with a parameter which is referenced in return statement. That macro was added in 6ee4074 but it was not removed when "DxilModule &M" was referenced in 86073a3 This fixes the following compiler error with clang 18.1.8 with mingw-w64 toolchain. DxilContainerReflection.cpp:1512:3: error: object of type 'DxilModule' cannot be assigned because its copy assignment operator is implicitly deleted 1512 | UNREFERENCED_PARAMETER(M); | ^ winnt.h:1387:40: note: expanded from macro 'UNREFERENCED_PARAMETER' 1387 | #define UNREFERENCED_PARAMETER(P) {(P) = (P);} | ^
1 parent c01b4f4 commit 5cb6faa

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

lib/HLSL/DxilContainerReflection.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1509,7 +1509,6 @@ void CShaderReflectionConstantBuffer::Initialize(
15091509
}
15101510

15111511
static unsigned CalcResTypeSize(DxilModule &M, DxilResource &R) {
1512-
UNREFERENCED_PARAMETER(M);
15131512
Type *Ty = R.GetHLSLType()->getPointerElementType();
15141513
if (R.IsStructuredBuffer()) {
15151514
Ty = dxilutil::StripArrayTypes(Ty);

0 commit comments

Comments
 (0)