We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a8b5b1b commit e114ddcCopy full SHA for e114ddc
1 file changed
lib/checkother.cpp
@@ -4194,6 +4194,9 @@ void CheckOtherImpl::checkShadowVariables()
4194
(functionScope->function->isStatic() || functionScope->function->isFriend()) &&
4195
shadowed->variable() && !shadowed->variable()->isLocal())
4196
return;
4197
+ if (functionScope->functionOf && functionScope->functionOf->isClassOrStructOrUnion() && functionScope->function &&
4198
+ functionScope->function->isStatic() && shadowed->function() && !shadowed->function()->isStatic())
4199
+ return;
4200
if (var.scope() && var.scope()->function && var.scope()->function->isConstructor()) {
4201
if (shadowed->variable() && shadowed->variable()->isMember())
4202
0 commit comments