================
@@ -15,7 +15,7 @@ enum SwitchTwo {
};
void testSwitchTwo(enum SwitchTwo st) {
- switch (st) {} // expected-warning{{enumeration values 'Vim' and 'Emacs' not
handled in switch}}
+ switch (st) {} // expected-warning{{enumeration values 'Ed', 'Vim' and
'Emacs' not handled in switch}}
}
----------------
rnk wrote:
We should have some test showing that the statement after the switch is
considered reachable. You can build one with -Wreturn-type and an int return:
```
int doswitch(SwitchTwo e) {
switch (e) {
case Emacs: return 42;
}
} // expected-warning {{asdf}}
```
https://github.com/llvm/llvm-project/pull/138562
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits