-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
Qt Creator 4.12.2, Qt Creator 4.13.0
-
Qt Creator 4.12.2
Based on Qt 5.14.2 (Clang 10.0 (Apple), 64 bit)
Built on Jun 2 2020 01:16:16
From revision 33c5ff216a
-
845afb25fc7bc296f4bd0aeb12207cdfbbc99107 2447d1d69ca941947c0df5cf32c6798f4cce1306
When creating a switch/case statement that uses blocks inside a case the warning
is showed.Do not use stand-alone blocks. (M115)
e.g.
switch ( var )
{
case 1:
{
break;
}
case 2:
{
break;
}
default:
{
break;
}
}
Many companies enforce using blocks inside cases as a coding standard.
- relates to
-
QTCREATORBUG-14581 Warning M115 when using blocks for switch/case
-
- Closed
-
| For Gerrit Dashboard: QTCREATORBUG-24214 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V |
| 347365,2 | QmlJS: Fix checking for case and default blocks | 4.15 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |
| 347366,5 | QmlJS: Restrict warnings of blocks | 4.15 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |