Skip to content

Commit 00be3ba

Browse files
authored
Remove unreachable std::unreachable(), fix typos 'less that' and 'supress'
1 parent 88db9ad commit 00be3ba

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

cpp2rust/converter/converter.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2354,7 +2354,6 @@ bool Converter::ConvertIncAndDec(clang::UnaryOperator *expr) {
23542354
default:
23552355
return false;
23562356
}
2357-
std::unreachable();
23582357
}
23592358

23602359
bool Converter::VisitUnaryOperator(clang::UnaryOperator *expr) {
@@ -2814,7 +2813,7 @@ bool Converter::VisitInitListExpr(clang::InitListExpr *expr) {
28142813
if (auto arr_ty = ctx_.getAsConstantArrayType(expr->getType())) {
28152814
assert(
28162815
(arr_ty->getSize().getZExtValue() - expr->getNumInits()) &&
2817-
"Number of initializers should be less that total size of array");
2816+
"Number of initializers should be less than total size of array");
28182817
for (unsigned i = 0;
28192818
i < arr_ty->getSize().getZExtValue() - expr->getNumInits(); ++i) {
28202819
ConvertVarInit(expr->getArrayFiller()->getType(),
@@ -3002,7 +3001,7 @@ bool Converter::VisitCXXConstructExpr(clang::CXXConstructExpr *expr) {
30023001
if (ctor->isCopyOrMoveConstructor() ||
30033002
(ctor->isConvertingConstructor(false) && ctor->getNumParams() == 1 &&
30043003
ctor->getParamDecl(0)->getType()->isRValueReferenceType())) {
3005-
// Take supress before recursing into the child.
3004+
// Take suppress before recursing into the child.
30063005
bool suppress = PushSuppressIteratorClone::take(*this);
30073006
Convert(expr->getArg(0));
30083007
if (ctor->isCopyConstructor() && !suppress) {

0 commit comments

Comments
 (0)