<table><tr><td style="">rjvbb added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D15694">View Revision</a></tr></table><br /><div><div><p>As mentioned on another ticket, I don't like the idea of not putting <tt style="background: #ebebeb; font-size: 13px;">break</tt>s, no matter how clever the compiler and hard-coded choice of compiler options; I don't think you gain anything from it, and it doesn't improve code readability either for me (esp. when switch cases aren't indented w.r.t the switch context, as in the last hunk in <tt style="background: #ebebeb; font-size: 13px;">plugins/qmljs/codecompletion/context.cpp</tt>.<br />
Making it obligatory to add a token confirming that fallthrough is intended is a good idea, though using a largish term in all-caps like <tt style="background: #ebebeb; font-size: 13px;">Q_FALLTHROUGH</tt> also doesn't improve readibilty. And what about the most common type of fallthrough, are we really going to have to write something like the following?</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">switch (type) {
    case TYPE_A:
        Q_FALLTHROUGH
    case TYPE_B:
        Q_FALLTHROUGH
    case TYPE_C:
        Q_FALLTHROUGH
    case TYPE_D:
        whatever();
        break;
    default:
        anyway();
        // remember not to put a break here
}</pre></div>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);"></pre></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R32 KDevelop</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D15694">https://phabricator.kde.org/D15694</a></div></div><br /><div><strong>To: </strong>aaronpuchert, KDevelop<br /><strong>Cc: </strong>rjvbb, brauch, mssola, kossebau, kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd<br /></div>