[Lldb-commits] [PATCH] D113155: [lldb] Remove nested switches from ARMGetSupportedArchitectureAtIndex (NFC)
Slava Gurevich via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 5 11:25:59 PDT 2022
fixathon added a comment.
Added comments
================
Comment at: lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp:640
+ }
+ return {};
+}
----------------
JDevlieghere wrote:
> fixathon wrote:
> > Could we delete this unreachable return statement? It's tripping up static code checkers since all possible branches already have a return.
> Yes, let's make it an `llvm_unreachable` (otherwise gcc will complain).
If we return {} in the **default** case, and delete this, gcc should not complain since all possible code paths will have a return, is that right?
Alternatively, we could break in the **default** case and leave this return alone. I prefer the first approach for consistency.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113155/new/
https://reviews.llvm.org/D113155
More information about the lldb-commits
mailing list