Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladiwostok committed Aug 8, 2024
1 parent 9e04e59 commit 3c0cc1b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/dscanner/analysis/body_on_disabled_funcs.d
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ extern (C++) class BodyOnDisabledFuncsCheck(AST) : BaseAnalyzerDmd
{
override void visit(NodeType node)
{
bool isCurrentDisabled = isDisabled || (node.storage_class & STC.disable) != 0;
if (isCurrentDisabled)
if (isDisabled || (node.storage_class & STC.disable) != 0;)
return;

bool wasDisabled = isDisabled;
Expand All @@ -56,8 +55,7 @@ extern (C++) class BodyOnDisabledFuncsCheck(AST) : BaseAnalyzerDmd
{
override void visit(NodeType node)
{
bool isCurrentDisabled = isDisabled || (node.storage_class & STC.disable) != 0;
if (isCurrentDisabled && node.fbody !is null)
if (isDisabled || (node.storage_class & STC.disable) != 0; && node.fbody !is null)
addErrorMessage(cast(ulong) node.loc.linnum, cast(ulong) node.loc.charnum, KEY, MSG);
}
}
Expand Down

0 comments on commit 3c0cc1b

Please sign in to comment.