fixathon added inline comments.
================
Comment at: lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp:640
+ }
+ return {};
+}
----------------
JDevlieghere wrote:
> fixathon wrote:
> > 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.
> Yes, you're right, it's only a problem for gcc when you explicitly handle
> every case (see all the instances of `llvm_unreachable("Fully covered
> switch!");` in lldb/llvm).
I'll just add a break to the default case to avoid llvm_unreachable(). What's
the best way to introduce this change? Can I link it to this diff somehow or a
stand-alone new diff?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113155/new/
https://reviews.llvm.org/D113155
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits