================ @@ -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) { ---------------- foxtran wrote:
Unfortunately, in `diag_FallThrough_HasNoReturn` case, we have one argument, and in `diag_FallThrough_ReturnsNonVoid` we have two arguments, so I just removed `EmitDiag` since it can not check how many arguments diag message have and use a proper branch. https://github.com/llvm/llvm-project/pull/127546 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits