================ @@ -3590,7 +3590,8 @@ StmtResult Sema::ActOnCapScopeReturnStmt(SourceLocation ReturnLoc, if (auto *CurBlock = dyn_cast<BlockScopeInfo>(CurCap)) { if (CurBlock->FunctionType->castAs<FunctionType>()->getNoReturnAttr()) { - Diag(ReturnLoc, diag::err_noreturn_block_has_return_expr); + Diag(ReturnLoc, diag::err_noreturn_has_return_expr) + << diag::FunModes::Block; return StmtError(); ---------------- Sirraide wrote:
The issue with that is that there are other kinds of ‘functions’ that this diagnostic doesn’t care about, e.g. ObjCMethods, some diagnostics might want to call member functions ‘methods’ instead etc. etc. It’s better to give it a more specific name imo because at least at the moment the primary use case for it is all of thse falloff-related diagnostics 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