From 207653c37dbe6976c8d16bc0816c7d1faaee51de Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Thu, 3 May 2012 20:05:46 +0000 Subject: [PATCH] Minor copy-edits to clang::fallthrough attribute documentation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156094 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/LanguageExtensions.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/LanguageExtensions.html b/docs/LanguageExtensions.html index 0952fa0469..1d57007897 100644 --- a/docs/LanguageExtensions.html +++ b/docs/LanguageExtensions.html @@ -1506,24 +1506,24 @@ with a __c11_ prefix. The supported operations are:

Non-standard C++11 Attributes

-

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

-

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