Fix MSVC "not all control paths return a value" warnings. NFCI.

Add missing llvm_unreachable()'s after each all-enums switch statement.
This commit is contained in:
Simon Pilgrim 2020-12-20 11:21:08 +00:00
parent 35f2c3a8b4
commit 7e84aa1b81

View File

@ -7637,6 +7637,7 @@ static Expr *BuildExpressionFromNonTypeTemplateArgumentValue(
auto *OVE = new (S.Context) OpaqueValueExpr(Loc, T, VK);
return ConstantExpr::Create(S.Context, OVE, Val);
}
llvm_unreachable("Unhandled APValue::ValueKind enum");
}
ExprResult
@ -7666,6 +7667,7 @@ Sema::BuildExpressionFromNonTypeTemplateArgument(const TemplateArgument &Arg,
return BuildExpressionFromNonTypeTemplateArgumentValue(
*this, Arg.getUncommonValueType(), Arg.getAsUncommonValue(), Loc);
}
llvm_unreachable("Unhandled TemplateArgument::ArgKind enum");
}
/// Match two template parameters within template parameter lists.