[clang] [clang][AST][NFC] Add '[[fallthrough]]' to cases fall through (PR #85921)
Ben Shi via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 20 04:54:20 PDT 2024
https://github.com/benshi001 created https://github.com/llvm/llvm-project/pull/85921
None
>From 144119d57d181fb16e27a5c7d869422a39185978 Mon Sep 17 00:00:00 2001
From: Ben Shi <bennshi at tencent.com>
Date: Wed, 20 Mar 2024 19:36:50 +0800
Subject: [PATCH] [clang][AST][NFC] Add '[[fallthrough]];' to cases fall
through
---
clang/lib/CodeGen/CGStmt.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp
index 8898e3f22a7df6..7d7744bafb110e 100644
--- a/clang/lib/CodeGen/CGStmt.cpp
+++ b/clang/lib/CodeGen/CGStmt.cpp
@@ -160,7 +160,7 @@ 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: // Intentional fall-through.
+ case Stmt::GCCAsmStmtClass: [[fallthrough]];
case Stmt::MSAsmStmtClass: EmitAsmStmt(cast<AsmStmt>(*S)); break;
case Stmt::CoroutineBodyStmtClass:
EmitCoroutineBody(cast<CoroutineBodyStmt>(*S));
More information about the cfe-commits
mailing list