Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
a18b058
Add Callable trait
lucic71 Sep 16, 2026
f9f5fd7
Deduplicate rules using the Callable trait
lucic71 Sep 16, 2026
3a7cbc4
Use fully qualified syntax for FnPtr::new
lucic71 Sep 16, 2026
8d5f2d1
Map types lazily
lucic71 Sep 16, 2026
6eeeeb7
Convert casted type lazily
lucic71 Sep 16, 2026
2b7394a
Pass nullable function to rules
lucic71 Sep 16, 2026
2bc199e
Update tests
lucic71 Sep 16, 2026
fd22c47
Remove nullability of arguments
lucic71 Sep 16, 2026
028e45d
Update tests
lucic71 Sep 16, 2026
5af5400
Translate lambdas as struct + operator call
lucic71 Sep 16, 2026
eec1a00
Add hoisted_records
lucic71 Sep 16, 2026
4b5bab8
Update tests
lucic71 Sep 16, 2026
dab0234
Update tests
lucic71 Sep 16, 2026
989890e
Fix naming clash between functoins and specializations
lucic71 Sep 16, 2026
2ddf78f
clang-format
lucic71 Sep 16, 2026
284ba1e
Merge branch 'function-local-records' into lambdas
lucic71 Sep 16, 2026
3bf9bdd
Merge branch 'master' into lambdas
lucic71 Sep 16, 2026
2382727
Rename to AddCallableTrait
lucic71 Sep 16, 2026
e04cad3
Check lambda in AddCloneTrait
lucic71 Sep 16, 2026
88be99f
Fix clone for lambdas
lucic71 Sep 16, 2026
b7324a5
Captureless lambdas don't have receiver
lucic71 Sep 16, 2026
70eff83
Declare lambda to function cast inline
lucic71 Sep 16, 2026
03f4c99
Always hoist lambdas
lucic71 Sep 16, 2026
73f0fa9
Synthesize an init list expr in VisitLambdaExpr
lucic71 Sep 16, 2026
d9bb6d2
Use RAII
lucic71 Sep 16, 2026
6d1e2f4
Assert on maxcallablearity
lucic71 Sep 16, 2026
0f56357
Captured variables are declrefexpr pointing to vardecl
lucic71 Sep 16, 2026
0e0ef10
Implement operator_call on Self instead of Ptr<Self>
lucic71 Sep 16, 2026
d6a2d09
Inline functions
lucic71 Sep 16, 2026
8777d62
Rename
lucic71 Sep 16, 2026
e66082e
Add to_free_function operator
lucic71 Sep 16, 2026
813cc6f
Move lambda functions in _lib
lucic71 Sep 17, 2026
7ec42f5
Remvove duplicated function
lucic71 Sep 17, 2026
1d53d95
Inline conversion of captured this
lucic71 Sep 17, 2026
c443023
Fix captured this
lucic71 Sep 17, 2026
64c87b1
Inline function
lucic71 Sep 17, 2026
f7e0baa
Merge branch 'master' into lambdas
lucic71 Sep 17, 2026
5b226e7
Add more lambda tests
lucic71 Sep 17, 2026
f2b20e2
format
lucic71 Sep 17, 2026
eb00dec
Remove ConvertCXXRecordDecl
lucic71 Sep 17, 2026
4db5767
Push unboxed when enttering Converter::VisitCXXRecordDecl
lucic71 Sep 17, 2026
4198025
Type of declrefexpr differs based on context
lucic71 Sep 17, 2026
1204400
Update docs
lucic71 Sep 17, 2026
9004343
Merge branch 'master' into lambdas
lucic71 Sep 17, 2026
dbac4cc
Merge artifacts
lucic71 Sep 17, 2026
65b66e1
Use ensure instead of assert
lucic71 Sep 17, 2026
2b6d740
Merge branch 'master' into lambdas
lucic71 Sep 17, 2026
dbb61ac
Update tests
lucic71 Sep 17, 2026
ba28423
Merge branch 'master' into lambdas
lucic71 Sep 23, 2026
c4e0d85
Update tests
lucic71 Sep 23, 2026
3fc0369
Port generic lambda support
lucic71 Sep 23, 2026
28b17ef
Update tests
lucic71 Sep 23, 2026
3688b37
Fix name of static
lucic71 Sep 23, 2026
fe14b6d
Merge branch 'master' into lambdas
lucic71 Sep 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove ConvertCXXRecordDecl
  • Loading branch information
lucic71 committed Sep 17, 2026
commit eb00decaa7ddd3c0f00eb03603d4db61b04982e4
17 changes: 5 additions & 12 deletions cpp2rust/converter/converter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -908,17 +908,9 @@ void Converter::EmitRustUnion(clang::RecordDecl *decl) {

bool Converter::VisitCXXRecordDecl(clang::CXXRecordDecl *decl) {
decl->dump(log());
std::vector<ExprKind> saved_expr_kinds;
saved_expr_kinds.swap(curr_expr_kind_);
ConvertCXXRecordDecl(decl);
curr_expr_kind_.swap(saved_expr_kinds);
return false;
}

void Converter::ConvertCXXRecordDecl(clang::CXXRecordDecl *decl) {
Mapper::AddRuleForUserDefinedType(decl);
if (!IsConvertibleCXXRecordDecl(decl)) {
return;
return false;
}

if (decl->isStruct() || decl->isClass()) {
Expand All @@ -935,12 +927,12 @@ void Converter::ConvertCXXRecordDecl(clang::CXXRecordDecl *decl) {
if (!decl->isAbstract()) {
ConvertLateInstantiatedMethods(decl);
}
return;
return false;
}

if (decl->isAbstract()) {
ConvertAbstractClass(decl);
return;
return false;
}

DefineImplicitMembers(decl);
Expand All @@ -951,13 +943,14 @@ void Converter::ConvertCXXRecordDecl(clang::CXXRecordDecl *decl) {
}
} else if (decl->isUnion()) {
if (!record_decls_.MarkDefined(GetRecordName(decl))) {
return;
return false;
}
EmitRustStructOrUnion(decl);
} else {
// FIXME: improve error handling
assert(0 && "unsupported record kind");
}
return false;
}

void Converter::DefineImplicitMembers(clang::CXXRecordDecl *decl) {
Expand Down
1 change: 0 additions & 1 deletion cpp2rust/converter/converter.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ class Converter : public clang::RecursiveASTVisitor<Converter> {
bool VisitRecordDecl(clang::RecordDecl *decl);

virtual bool VisitCXXRecordDecl(clang::CXXRecordDecl *decl);
void ConvertCXXRecordDecl(clang::CXXRecordDecl *decl);

virtual void EmitRustStructOrUnion(clang::RecordDecl *decl);

Expand Down