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>
Fri, 6 Apr 2018 16:23:52 +0000 (18:23 +0200)
commitfefbb186cc197295ce493322832cadf22ee1cefe
treee62c54f83f9588b10fc7424d55f277ffb3fa0f6c
parent5e5f16b8e8557e5ac4c9feea9befef582498799d
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

(cherry picked from commit 9ba2ca5186c8598e33910a7df95bbdbf812a1a3d)
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