Skip to content

Commit e114ddc

Browse files
committed
fix
1 parent a8b5b1b commit e114ddc

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/checkother.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4194,6 +4194,9 @@ void CheckOtherImpl::checkShadowVariables()
41944194
(functionScope->function->isStatic() || functionScope->function->isFriend()) &&
41954195
shadowed->variable() && !shadowed->variable()->isLocal())
41964196
return;
4197+
if (functionScope->functionOf && functionScope->functionOf->isClassOrStructOrUnion() && functionScope->function &&
4198+
functionScope->function->isStatic() && shadowed->function() && !shadowed->function()->isStatic())
4199+
return;
41974200
if (var.scope() && var.scope()->function && var.scope()->function->isConstructor()) {
41984201
if (shadowed->variable() && shadowed->variable()->isMember())
41994202
return;

0 commit comments

Comments
 (0)