While cases of the switch return (or are unreachable), if a non-enum integer was cast into the enum, it's possible for this switch to fall through without returning, hence allowing control to reach the end of a non-void function. So, we explicitly mark with llvm_unreachable after the switch.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I'd argue the warning is correct as you could store "non-enum" integer values into an enum typed variable (and people do that fairly often with bitwise enums).