Implicit switch fallthrough refactor

This commit is contained in:
Jack Andersen 2019-02-17 19:44:46 -10:00
parent fdbfbf74fd
commit fc40190933
4 changed files with 9 additions and 2 deletions

2
hecl/extern/boo vendored

@ -1 +1 @@
Subproject commit 45db327fb32238e0c435d272d00f1f82dbca0493
Subproject commit 1c21519d5dcd41fbabd11b9db0d0d6ffa99c8368

View File

@ -325,6 +325,7 @@ GX::TraceResult GX::RecursiveTraceColor(const IR& ir, Diagnostics& diag, const I
}
diag.reportBackendErr(inst.m_loc, "unable to convert arithmetic to TEV stage");
break;
}
case IR::OpType::Swizzle: {
if (inst.m_swizzle.m_idxs[0] == 3 && inst.m_swizzle.m_idxs[1] == 3 && inst.m_swizzle.m_idxs[2] == 3 &&
@ -335,6 +336,7 @@ GX::TraceResult GX::RecursiveTraceColor(const IR& ir, Diagnostics& diag, const I
return RecursiveTraceColor(ir, diag, cInst, true);
} else
diag.reportBackendErr(inst.m_loc, "only alpha extract may be performed with swizzle operation");
break;
}
default:
diag.reportBackendErr(inst.m_loc, "invalid color op");
@ -573,6 +575,7 @@ GX::TraceResult GX::RecursiveTraceAlpha(const IR& ir, Diagnostics& diag, const I
}
diag.reportBackendErr(inst.m_loc, "unable to convert arithmetic to TEV stage");
break;
}
case IR::OpType::Swizzle: {
if (inst.m_swizzle.m_idxs[0] == 3 && inst.m_swizzle.m_idxs[1] == 3 && inst.m_swizzle.m_idxs[2] == 3 &&
@ -583,6 +586,7 @@ GX::TraceResult GX::RecursiveTraceAlpha(const IR& ir, Diagnostics& diag, const I
return RecursiveTraceAlpha(ir, diag, cInst);
} else
diag.reportBackendErr(inst.m_loc, "only alpha extract may be performed with swizzle operation");
break;
}
default:
diag.reportBackendErr(inst.m_loc, "invalid alpha op");

View File

@ -160,6 +160,7 @@ std::string ProgrammableCommon::RecursiveTraceColor(const IR& ir, Diagnostics& d
default:
diag.reportBackendErr(inst.m_loc, "invalid arithmetic op");
}
break;
}
case IR::OpType::Swizzle: {
const IR::Instruction& aInst = inst.getChildInst(ir, 0);
@ -179,7 +180,7 @@ std::string ProgrammableCommon::RecursiveTraceAlpha(const IR& ir, Diagnostics& d
case IR::OpType::Call: {
const std::string& name = inst.m_call.m_name;
bool normalize = false;
if (!name.compare("Texture") || (normalize = true && !name.compare("TextureN"))) {
if (!name.compare("Texture") || ((normalize = true) && !name.compare("TextureN"))) {
if (inst.getChildCount() < 2)
diag.reportBackendErr(inst.m_loc, "Texture(map, texgen) requires 2 arguments");
@ -230,6 +231,7 @@ std::string ProgrammableCommon::RecursiveTraceAlpha(const IR& ir, Diagnostics& d
default:
diag.reportBackendErr(inst.m_loc, "invalid arithmetic op");
}
break;
}
case IR::OpType::Swizzle: {
const IR::Instruction& aInst = inst.getChildInst(ir, 0);

View File

@ -423,6 +423,7 @@ hecl::DirectoryEnumerator::DirectoryEnumerator(SystemStringView path, Mode mode,
if (mode == Mode::DirsSorted)
break;
rewinddir(dir);
[[fallthrough]];
}
case Mode::FilesSorted: {
if (mode == Mode::FilesSorted)