[clang-tools-extra] [clang-tidy][NFC] Enable `readability-avoid-return-with-void-value` check in the codebase (PR #151356)
Baranov Victor via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 30 14:03:34 PDT 2025
================
@@ -577,19 +579,26 @@ void NarrowingConversionsCheck::handleImplicitCast(
SourceLocation SourceLoc = Lhs.getExprLoc();
switch (Cast.getCastKind()) {
case CK_BooleanToSignedIntegral:
- return handleBooleanToSignedIntegral(Context, SourceLoc, Lhs, Rhs);
+ handleBooleanToSignedIntegral(Context, SourceLoc, Lhs, Rhs);
+ break;
----------------
vbvictor wrote:
Could we `return` instead of `break` here everywhere?
With `break`, I still need to check the end of `switch` to see if there is any more code in the function. With `return` I don't care about code after `switch`.
https://github.com/llvm/llvm-project/pull/151356
More information about the cfe-commits
mailing list