Skip to content

Commit 680424e

Browse files
committed
Fix merge artifacts
1 parent c68dcee commit 680424e

2 files changed

Lines changed: 1 addition & 15 deletions

File tree

cpp2rust/converter/converter.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1618,7 +1618,7 @@ Converter::CallInfo Converter::CollectCallInfo(clang::CallExpr *expr) {
16181618
const auto *function = decl ? decl->getAsFunction() : nullptr;
16191619
const clang::FunctionProtoType *proto = nullptr;
16201620
if (!function) {
1621-
auto callee_ty = info.callee->getType().getDesugaredType(ctx_);
1621+
auto callee_ty = callee->getType().getDesugaredType(ctx_);
16221622
if (auto ptr_ty = callee_ty->getAs<clang::PointerType>()) {
16231623
proto = ptr_ty->getPointeeType()->getAs<clang::FunctionProtoType>();
16241624
}
@@ -1651,10 +1651,6 @@ Converter::CallInfo Converter::CollectCallInfo(clang::CallExpr *expr) {
16511651
.kind = info.is_libc_passthrough ? Kind::Inline : Kind::Hoisted,
16521652
};
16531653
bool is_materialize = clang::isa<clang::MaterializeTemporaryExpr>(arg);
1654-
if (is_materialize && ca.param_type->isLValueReferenceType()) {
1655-
ca.kind = Kind::Materialized;
1656-
};
1657-
bool is_materialize = clang::isa<clang::MaterializeTemporaryExpr>(arg);
16581654
if (is_materialize && ca.param_type->isLValueReferenceType()) {
16591655
ca.kind = Kind::Materialized;
16601656
} else if (is_materialize) {
@@ -1755,10 +1751,6 @@ void Converter::EmitArgList(const CallInfo &info) {
17551751
}
17561752
}
17571753

1758-
void Converter::EmitCall(CallInfo &&info) {
1759-
EmitHoistedArgs(info);
1760-
}
1761-
17621754
void Converter::EmitCall(CallInfo &&info) {
17631755
EmitHoistedArgs(info);
17641756

cpp2rust/converter/converter.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,6 @@ class Converter : public clang::RecursiveASTVisitor<Converter> {
252252

253253
void ConvertParamTy(clang::QualType param_type, clang::Expr *expr);
254254

255-
};
256-
257-
CallInfo CollectCallInfo(clang::CallExpr *expr);
258-
259-
void ConvertParamTy(clang::QualType param_type, clang::Expr *expr);
260-
261255
void EmitHoistedArgs(CallInfo &info);
262256

263257
void EmitArgList(const CallInfo &info);

0 commit comments

Comments
 (0)