Enable the comma operator warning in synchronized statements

This commit is contained in:
Hackerpilot 2016-05-04 03:24:32 -07:00
parent 97c4e48ce5
commit 02f8f3c423
1 changed files with 9 additions and 0 deletions

View File

@ -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);