From 207653c37dbe6976c8d16bc0816c7d1faaee51de Mon Sep 17 00:00:00 2001
From: Richard Smith
Clang supports one non-standard C++11 attribute. It resides in clang -namespace.
+Clang supports one non-standard C++11 attribute. It resides in the +clang attribute namespace.
The clang::fallthrough attribute is used along with --Wimplicit-fallthrough diagnostic to annotate intentional fall-through -between switch labels. It can only be applied to a null statement placed in a +
The clang::fallthrough attribute is used along with the +-Wimplicit-fallthrough argument to annotate intentional fall-through +between switch labels. It can only be applied to a null statement placed at a point of execution between any statement and the next switch label. It is common to mark these places with a specific comment, but this attribute is meant to replace comments with a more strict annotation, which can be checked by the compiler. This attribute doesn't change semantics of the code and can be used -wherever an intended fall-through occurs, but it is designed to mimic -control-flow statements like break; so it can be placed in most places -where break; can, but only if there are no statements on execution path -between it and the next switch label.
+wherever an intended fall-through occurs. It is designed to mimic +control-flow statements like break;, so it can be placed in most places +where break; can, but only if there are no statements on the execution +path between it and the next switch label.Here is an example:
// compile with -Wimplicit-fallthrough -- 2.40.0