Skip to content

Commit e8b0295

Browse files
committed
fix build with clang 24
1 parent 4c824c3 commit e8b0295

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

‎cpp2rust/converter/converter.cpp‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2174,8 +2174,15 @@ Converter::ConvertCallExpr(clang::CallExpr *expr) {
21742174
} else if (IsTransparentStdCall(expr)) {
21752175
Convert(expr->getArg(0));
21762176
} else if (IsBuiltinConstantP(callee)) {
2177-
StrCat(expr->getArg(0)->isCXX11ConstantExpr(ctx_) ? token::kOne
2178-
: token::kZero);
2177+
clang::APValue V;
2178+
StrCat(expr->getArg(0)->isCXX11ConstantExpr(ctx_
2179+
#if CLANG_VERSION_MAJOR >= 24
2180+
,
2181+
V
2182+
#endif
2183+
)
2184+
? token::kOne
2185+
: token::kZero);
21792186
} else if (Mapper::Contains(callee)) {
21802187
auto **args = expr->getArgs();
21812188
auto num_args = expr->getNumArgs();

0 commit comments

Comments
 (0)