[Lldb-commits] [PATCH] D131244: [LLDB] Missing break in a switch statement alters the execution flow.

Slava Gurevich via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 5 00:36:08 PDT 2022


fixathon created this revision.
fixathon added reviewers: clayborg, JDevlieghere, DavidSpickett.
Herald added a project: All.
fixathon requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Looks like a typo from the past code changes.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D131244

Files:
  lldb/source/Plugins/Process/Utility/ARMUtils.h


Index: lldb/source/Plugins/Process/Utility/ARMUtils.h
===================================================================
--- lldb/source/Plugins/Process/Utility/ARMUtils.h
+++ lldb/source/Plugins/Process/Utility/ARMUtils.h
@@ -25,7 +25,8 @@
                                       ARM_ShifterType &shift_t) {
   switch (type) {
   default:
-  // assert(0 && "Invalid shift type");
+    // assert(0 && "Invalid shift type");
+    break;
   case 0:
     shift_t = SRType_LSL;
     return imm5;
@@ -311,6 +312,8 @@
   if (bits(imm12, 11, 10) == 0) {
     switch (bits(imm12, 9, 8)) {
     default: // Keep static analyzer happy with a default case
+      break;
+
     case 0:
       imm32 = abcdefgh;
       break;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131244.450247.patch
Type: text/x-patch
Size: 713 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220805/0b187120/attachment.bin>


More information about the lldb-commits mailing list