Skip to content

Commit a289ec3

Browse files
committed
Wrap variadic arg in paren before calling .into()
1 parent e35f62a commit a289ec3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cpp2rust/converter/converter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1487,8 +1487,8 @@ std::optional<std::string> Converter::TryPluginConvert(clang::CallExpr *call) {
14871487
}
14881488

14891489
void Converter::ConvertVariadicArg(clang::Expr *arg) {
1490+
PushParen p(*this);
14901491
if (arg->getType()->isFunctionPointerType()) {
1491-
PushParen p(*this);
14921492
Convert(arg);
14931493
StrCat(".map_or(::std::ptr::null_mut(), |f| f as *mut ::libc::c_void)");
14941494
return;

0 commit comments

Comments
 (0)