[clang] [clang][Sema] Combine fallout warnings to just one warning (PR #127546)

via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 18 13:50:26 PST 2025


================
@@ -696,12 +661,12 @@ static void CheckFallThroughForBody(Sema &S, const Decl *D, const Stmt *Body,
   if (CD.checkDiagnostics(Diags, ReturnsVoid, HasNoReturn))
       return;
   SourceLocation LBrace = Body->getBeginLoc(), RBrace = Body->getEndLoc();
-  auto EmitDiag = [&](SourceLocation Loc, unsigned DiagID) {
+  auto EmitDiag = [&](SourceLocation Loc, unsigned DiagID, unsigned FunMode) {
----------------
Sirraide wrote:

This lambda has a capture-default of `&` anyway, so just use `CD.FunMode` in the lambda imo.

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


More information about the cfe-commits mailing list