summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-type-layout.cpp
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2023-05-05 22:21:30 +0800
committerGitHub <noreply@github.com>2023-05-05 10:21:30 -0400
commite69c23e596baf082d928bd18dc364ea6f846c457 (patch)
treea2f2463cb1f2e73a2e26c0641625c8ef51d79c11 /source/slang/slang-type-layout.cpp
parent662ef3ed90cd96435c05096c50f3486a1a6e9d18 (diff)
Squash a couple of warnings on clang (#2870)
* Squash a couple of warnings on clang Redisable -Wunused-local-typedefs * unused variable
Diffstat (limited to 'source/slang/slang-type-layout.cpp')
-rw-r--r--source/slang/slang-type-layout.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/slang/slang-type-layout.cpp b/source/slang/slang-type-layout.cpp
index 79236fc48..c7b9af40b 100644
--- a/source/slang/slang-type-layout.cpp
+++ b/source/slang/slang-type-layout.cpp
@@ -3720,7 +3720,7 @@ static TypeLayoutResult _createTypeLayout(
// If the field has an explicit offset, then we will
// use that to place it.
//
- if (auto packOffsetModifier = field.getDecl()->findModifier<HLSLPackOffsetSemantic>())
+ if (const auto packOffsetModifier = field.getDecl()->findModifier<HLSLPackOffsetSemantic>())
{
TypeLayoutResult fieldResult = _createTypeLayout(
context,
@@ -3733,7 +3733,7 @@ static TypeLayoutResult _createTypeLayout(
}
for (auto field : getFields(structDeclRef, MemberFilterStyle::Instance))
{
- if (auto packOffsetModifier = field.getDecl()->findModifier<HLSLPackOffsetSemantic>())
+ if (const auto packOffsetModifier = field.getDecl()->findModifier<HLSLPackOffsetSemantic>())
continue;
// The fields of a `struct` type may include existential (interface)