Remove implicit fallthrough (#3298)
Fixes #3296
* Make OpReturn its own case fully
diff --git a/source/val/validate_cfg.cpp b/source/val/validate_cfg.cpp
index 1c279f6..1e33e51 100644
--- a/source/val/validate_cfg.cpp
+++ b/source/val/validate_cfg.cpp
@@ -1090,8 +1090,9 @@
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: