Commit d423a4c
Fix unreachable-break issue in executorch/runtime/executor/method_meta.cpp +5
Summary:
LLVM has a warning `-Wunreachable-code-break` which identifies `break` statements that cannot be reached. These compromise readability, are misleading, and may identify bugs. This diff removes such statements.
Such statements once existed to prevent accidental fallthroughs in switch statements. However, this is no longer necessary in C++17 because `[[fallthrough]]` is used to indicate intentional fallthroughs and we raise compilation errors for fallthroughs that are not annotated with `[[fallthrough]]` using `-Wimplicit-fallthrough`.
For questions/comments, contact r-barnes.
- If you approve of this diff, please use the "Accept & Ship" button :-)
Reviewed By: dtolnay
Differential Revision: D782759551 parent 00491fd commit d423a4c
1 file changed
+6
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | | - | |
30 | | - | |
| 29 | + | |
31 | 30 | | |
32 | | - | |
33 | | - | |
| 31 | + | |
34 | 32 | | |
35 | | - | |
36 | | - | |
| 33 | + | |
37 | 34 | | |
38 | | - | |
39 | | - | |
| 35 | + | |
40 | 36 | | |
41 | | - | |
42 | | - | |
| 37 | + | |
43 | 38 | | |
44 | | - | |
45 | 39 | | |
46 | 40 | | |
47 | 41 | | |
| |||
0 commit comments