[clang] a480841 - Add missing break statement in switch.

Stanislav Gatev via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 17 01:38:05 PST 2022


Author: Stanislav Gatev
Date: 2022-02-17T09:37:02Z
New Revision: a48084156653e8f3791d13c19ce64df13c44a11e

URL: https://github.com/llvm/llvm-project/commit/a48084156653e8f3791d13c19ce64df13c44a11e
DIFF: https://github.com/llvm/llvm-project/commit/a48084156653e8f3791d13c19ce64df13c44a11e.diff

LOG: Add missing break statement in switch.

Added: 
    

Modified: 
    clang/lib/Analysis/FlowSensitive/Transfer.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Analysis/FlowSensitive/Transfer.cpp b/clang/lib/Analysis/FlowSensitive/Transfer.cpp
index 72475e0c79d90..cd9b8b0e454e4 100644
--- a/clang/lib/Analysis/FlowSensitive/Transfer.cpp
+++ b/clang/lib/Analysis/FlowSensitive/Transfer.cpp
@@ -260,12 +260,13 @@ class TransferVisitor : public ConstStmtVisitor<TransferVisitor> {
       auto *SubExprVal =
           dyn_cast_or_null<BoolValue>(Env.getValue(*SubExpr, SkipPast::None));
       if (SubExprVal == nullptr)
-        return;
+        break;
 
       auto &ExprLoc = Env.createStorageLocation(*S);
       Env.setStorageLocation(*S, ExprLoc);
       Env.setValue(ExprLoc, Env.takeOwnership(
                                 std::make_unique<NegationValue>(*SubExprVal)));
+      break;
     }
     default:
       break;


        


More information about the cfe-commits mailing list