From fd4dc785af853dcab62ae9f54472af7fd9c75025 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 17 May 2026 21:05:15 +0000 Subject: [PATCH 1/3] Initial plan From 406c47ef70071efae44a446d7331b93cef6be228 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 17 May 2026 21:05:54 +0000 Subject: [PATCH 2/3] Fix typo, idiomatic empty check, and missing nullptr arg in converter_lib.cpp Agent-Logs-Url: https://github.com/Cpp2Rust/cpp2rust/sessions/b040cd89-3c59-4900-bde6-77258f6721f9 Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com> --- cpp2rust/converter/converter_lib.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp2rust/converter/converter_lib.cpp b/cpp2rust/converter/converter_lib.cpp index fabfe0fe..da928a3e 100644 --- a/cpp2rust/converter/converter_lib.cpp +++ b/cpp2rust/converter/converter_lib.cpp @@ -274,8 +274,8 @@ GetUserDefinedDefaultConstructor(const clang::CXXRecordDecl *decl) { std::string GetMainFileName(const clang::ASTContext &ctx) { const auto &src_mgr = ctx.getSourceManager(); - auto filed_id = src_mgr.getMainFileID(); - auto file_entry = src_mgr.getFileEntryRefForID(filed_id); + auto file_id = src_mgr.getMainFileID(); + auto file_entry = src_mgr.getFileEntryRefForID(file_id); auto file_path = file_entry->getName(); auto file_name = llvm::sys::path::filename(file_path); return llvm::sys::path::stem(file_name).str(); @@ -399,7 +399,7 @@ std::string GetNamedDeclAsString(const clang::NamedDecl *decl) { } } - if (name.size() == 0) { + if (name.empty()) { name = "self"; } @@ -539,7 +539,7 @@ GetTemplateArgs(clang::QualType qual_type, clang::Expr *expr) { if (auto pt = qual_type->getPointeeType(); !pt.isNull()) qual_type = pt; - return GetTemplateArgs(qual_type); + return GetTemplateArgs(qual_type, nullptr); } clang::Expr *GetCallObject(clang::CallExpr *expr) { From 7836d00ad14647de46e73b2eeeb6dd6854126968 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 17 May 2026 21:27:55 +0000 Subject: [PATCH 3/3] Revert GetTemplateArgs nullptr change per review feedback Agent-Logs-Url: https://github.com/Cpp2Rust/cpp2rust/sessions/b4837478-5dcc-426c-ab0e-2e2636c0fbd6 Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com> --- cpp2rust/converter/converter_lib.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp2rust/converter/converter_lib.cpp b/cpp2rust/converter/converter_lib.cpp index da928a3e..040d7d1b 100644 --- a/cpp2rust/converter/converter_lib.cpp +++ b/cpp2rust/converter/converter_lib.cpp @@ -539,7 +539,7 @@ GetTemplateArgs(clang::QualType qual_type, clang::Expr *expr) { if (auto pt = qual_type->getPointeeType(); !pt.isNull()) qual_type = pt; - return GetTemplateArgs(qual_type, nullptr); + return GetTemplateArgs(qual_type); } clang::Expr *GetCallObject(clang::CallExpr *expr) {