width: {
}
should not trigger a warning. We now only warn if { and } are
on the same line.
Change-Id: I45fa846ff63d0a83de782c412212165845c07e72
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
}
if (!ast->statements
&& (cast<UiPublicMember *>(p)
- || cast<UiScriptBinding *>(p))) {
- addMessage(WarnUnintentinalEmptyBlock, ast->firstSourceLocation());
+ || cast<UiScriptBinding *>(p))
+ && ast->lbraceToken.startLine == ast->rbraceToken.startLine) {
+ addMessage(WarnUnintentinalEmptyBlock, locationFromRange(ast->firstSourceLocation(), ast->lastSourceLocation()));
}
}
return true;