qa: Replace [[fallthrough]] by [[clang::fallthrough]]
authorManuel Nickschas <sputnick@quassel-irc.org>
Tue, 27 Feb 2018 10:33:03 +0000 (11:33 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 5 Apr 2018 21:45:17 +0000 (23:45 +0200)
commit9ba2ca5186c8598e33910a7df95bbdbf812a1a3d
treef7458241060bacc37fbc739f0f8f73b778014ef0
parentf5abb30ac6ec8089901d686d9c2ec3387f97aaef
qa: Replace [[fallthrough]] by [[clang::fallthrough]]

The [[fallthrough]] attribute is a C++17 extension. It happens to work
in GCC 7, but causes warnings or even failures in other compilers.

In my quest to find a syntax that makes all compilers happy without
having to disable the (useful) warning, I think I have finally
found a way. Using the clang:: namespace seems to solve several
issues:

* It is marked as a compiler extension, so compilers not supporting it
  should simply ignore the attribute
* It (obviously) works in Clang, which is nice when using a Clang-based
  IDE like Qt Creator
* For some reason, it also seems to silence warnings in GCC; I guess one
  of GCC's fancy regexes somehow matches
src/core/coresessioneventprocessor.cpp
src/core/eventstringifier.cpp
src/core/sqlitestorage.cpp
src/qtui/bufferwidget.cpp
src/qtui/chatscene.cpp
src/uisupport/networkmodelcontroller.cpp
src/uisupport/tabcompleter.cpp