Skip to content

Commit

Permalink
Enable the comma operator warning in synchronized statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackerpilot committed May 4, 2016
1 parent 97c4e48 commit 02f8f3c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/analysis/comma_expression.d
Expand Up @@ -38,6 +38,15 @@ class CommaExpressionCheck : BaseAnalyzer
--interest;
}

// Dconf 2016
override void visit(const SynchronizedStatement ss)
{
++interest;
visit(ss.expression);
--interest;
visit(ss.statementNoCaseNoDefault);
}

invariant
{
assert(interest >= 0);
Expand Down

0 comments on commit 02f8f3c

Please sign in to comment.