D15532: [Astyle] Add Objective C to list of languages with formatters

Aaron Puchert noreply at phabricator.kde.org
Sat Sep 22 15:37:04 BST 2018

aaronpuchert added a comment.

  In D15532#330024 <https://phabricator.kde.org/D15532#330024>, @rjvbb wrote:
  > I prefer to remind myself of such things and that I'm putting it there anyway (because the compiler won't be able to tell me I really forgot to use one, not unless you make some kind of "no break here" statement obligatory).
  In a way that is what is slowly happening. With C++17 there will be a standardized <https://en.cppreference.com/w/cpp/language/attributes/fallthrough> attribute `[[fallthrough]]` and I suspect that `-Wfallthrough` will become a standard warning like `-Wreturn-type` by then. (The latter warns if some code paths in a function don't return a value, as in `int f() {}`.) As for Qt, there is of course `Q_FALLTHROUGH()` in `qcompilerdetection.h`, which chooses one of `[[{,gnu::,clang::}fallthrough]]`, depending on which is available.
  With that attribute fallthroughs can be annotated, so the compiler can easily warn if a `break` statement is missing. When there is a false positive, it can easily be fixed by adding the attribute.

  R32 KDevelop


To: rjvbb, #kdevelop, kossebau, kfunk
Cc: aaronpuchert, kfunk, pino, kossebau, kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180922/0a4dae3c/attachment.html>

More information about the KDevelop-devel mailing list