From cc9ada16b3dbbbd85f03faec74afc7bae4b8014c Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Sat, 2 Mar 2024 05:19:19 +0800 Subject: Small cleanups for bitfield accessor synthesis (#3651) * Remove duplicate function * neaten --------- Co-authored-by: Yong He --- source/slang/slang-lower-to-ir.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/slang/slang-lower-to-ir.cpp') diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp index 17ce04fec..89fc00087 100644 --- a/source/slang/slang-lower-to-ir.cpp +++ b/source/slang/slang-lower-to-ir.cpp @@ -8878,9 +8878,9 @@ struct DeclLoweringVisitor : DeclVisitor void addBitFieldAccessorDecorations(IRInst* irFunc, Decl* decl) { - // If this is an accessor under a property we can move the bitfield - // modifiers on the property to the accessor function. - if(as(decl) && as(decl->parentDecl)) + // If this is an accessor and the parent is describing some bitfield, + // we can move the bitfield modifiers to the accessor function. + if(as(decl)) { if(const auto bfm = decl->parentDecl->findModifier()) { -- cgit v1.2.3