[clang] [clang][AST][NFC] Add '[[fallthrough]]' to cases fall through (PR #85921)

via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 20 04:57:00 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff e2fa90fa0a4b7950dd0d7fae6933e89c075d0af0 144119d57d181fb16e27a5c7d869422a39185978 -- clang/lib/CodeGen/CGStmt.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp
index 7d7744bafb..7bec3d227f 100644
--- a/clang/lib/CodeGen/CGStmt.cpp
+++ b/clang/lib/CodeGen/CGStmt.cpp
@@ -160,7 +160,8 @@ void CodeGenFunction::EmitStmt(const Stmt *S, ArrayRef<const Attr *> Attrs) {
   case Stmt::ReturnStmtClass:  EmitReturnStmt(cast<ReturnStmt>(*S));      break;
 
   case Stmt::SwitchStmtClass:  EmitSwitchStmt(cast<SwitchStmt>(*S));      break;
-  case Stmt::GCCAsmStmtClass:  [[fallthrough]];
+  case Stmt::GCCAsmStmtClass:
+    [[fallthrough]];
   case Stmt::MSAsmStmtClass:   EmitAsmStmt(cast<AsmStmt>(*S));            break;
   case Stmt::CoroutineBodyStmtClass:
     EmitCoroutineBody(cast<CoroutineBodyStmt>(*S));

``````````

</details>


https://github.com/llvm/llvm-project/pull/85921


More information about the cfe-commits mailing list