D15694: Make implicit fallthroughs a compiler error, remove unneeded breaks
noreply at phabricator.kde.org
Sat Sep 22 17:50:01 BST 2018
aaronpuchert created this revision.
aaronpuchert added a reviewer: KDevelop.
Herald added a project: KDevelop.
aaronpuchert requested review of this revision.
With -Wimplicit-fallthrough the compiler warns about unannotated
fallthroughs in switch statements. Since it is supported by both GCC and
Clang, and can easily be fixed by adding Q_FALLTHROUGH() we enable it as
As a consequence, we don't need to add redundant break statements as
safety measure. So we also warn about that, but not as error, especially
since it's only supported on Clang. (As far as I know.)
Some of the fallthroughs are suspicious to me, maybe there is actually
To: aaronpuchert, #kdevelop
Cc: kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KDevelop-devel