ArgExpr = Iter.getDesugar().getAsExpr();
return ArgExpr->EvaluateKnownConstInt(Context);
default:
- assert(0 && "Unexpected template argument kind");
+ llvm_unreachable("Unexpected template argument kind");
}
return ArgExpr->EvaluateKnownConstInt(Context);
}
ArgExpr = Iter.getDesugar().getAsExpr();
return cast<DeclRefExpr>(ArgExpr)->getDecl();
default:
- assert(0 && "Unexpected template argument kind");
+ llvm_unreachable("Unexpected template argument kind");
}
DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(ArgExpr);
if (!DRE) {
if (VK == VK_RValue && !E->isRValue()) {
switch (Kind) {
default:
- assert(0 && "can't implicitly cast lvalue to rvalue with this cast kind");
+ llvm_unreachable("can't implicitly cast lvalue to rvalue with this cast "
+ "kind");
case CK_LValueToRValue:
case CK_ArrayToPointerDecay:
case CK_FunctionToPointerDecay:
OS << " switch (Kind) {\n";
OS << " default:\n";
- OS << " assert(0 && \"Unknown attribute!\");\n";
- OS << " break;\n";
+ OS << " llvm_unreachable(\"Unknown attribute!\");\n";
for (const auto *Attr : Attrs) {
const Record &R = *Attr;
if (!R.getValueAsBit("ASTNode"))