Skip to content

Commit

Permalink
Remove implicit fallthrough (#3298)
Browse files Browse the repository at this point in the history
Fixes #3296

* Make OpReturn its own case fully
  • Loading branch information
alan-baker authored Apr 14, 2020
1 parent 4956644 commit 2a2bdbd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/val/validate_cfg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1090,8 +1090,9 @@ spv_result_t CfgPass(ValidationState_t& _, const Instruction* inst) {
return _.diag(SPV_ERROR_INVALID_CFG, inst)
<< "OpReturn can only be called from a function with void "
<< "return type.";
_.current_function().RegisterBlockEnd(std::vector<uint32_t>(), opcode);
break;
}
// Fallthrough.
case SpvOpKill:
case SpvOpReturnValue:
case SpvOpUnreachable:
Expand Down

0 comments on commit 2a2bdbd

Please sign in to comment.