From 88db9ada2fe6b60757b992de79b97aa3f5570f2c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 4 Jun 2026 17:31:23 +0000 Subject: [PATCH 1/2] Initial plan From 00be3bad518218795661e9aabef93c1bb223e852 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 4 Jun 2026 17:33:16 +0000 Subject: [PATCH 2/2] Remove unreachable std::unreachable(), fix typos 'less that' and 'supress' --- cpp2rust/converter/converter.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cpp2rust/converter/converter.cpp b/cpp2rust/converter/converter.cpp index f6702629..fde1092b 100644 --- a/cpp2rust/converter/converter.cpp +++ b/cpp2rust/converter/converter.cpp @@ -2354,7 +2354,6 @@ bool Converter::ConvertIncAndDec(clang::UnaryOperator *expr) { default: return false; } - std::unreachable(); } bool Converter::VisitUnaryOperator(clang::UnaryOperator *expr) { @@ -2814,7 +2813,7 @@ bool Converter::VisitInitListExpr(clang::InitListExpr *expr) { if (auto arr_ty = ctx_.getAsConstantArrayType(expr->getType())) { assert( (arr_ty->getSize().getZExtValue() - expr->getNumInits()) && - "Number of initializers should be less that total size of array"); + "Number of initializers should be less than total size of array"); for (unsigned i = 0; i < arr_ty->getSize().getZExtValue() - expr->getNumInits(); ++i) { ConvertVarInit(expr->getArrayFiller()->getType(), @@ -3002,7 +3001,7 @@ bool Converter::VisitCXXConstructExpr(clang::CXXConstructExpr *expr) { if (ctor->isCopyOrMoveConstructor() || (ctor->isConvertingConstructor(false) && ctor->getNumParams() == 1 && ctor->getParamDecl(0)->getType()->isRValueReferenceType())) { - // Take supress before recursing into the child. + // Take suppress before recursing into the child. bool suppress = PushSuppressIteratorClone::take(*this); Convert(expr->getArg(0)); if (ctor->isCopyConstructor() && !suppress) {