We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9761ca commit 4fad019Copy full SHA for 4fad019
1 file changed
cpp2rust/converter/converter.cpp
@@ -3151,7 +3151,8 @@ bool Converter::VisitImplicitValueInitExpr(clang::ImplicitValueInitExpr *expr) {
3151
if (auto arr_ty = clang::dyn_cast<clang::ArrayType>(
3152
expr->getType()->getCanonicalTypeInternal().getTypePtr())) {
3153
if (auto const_arr_ty = clang::dyn_cast<clang::ConstantArrayType>(arr_ty)) {
3154
- if (const_arr_ty->getElementType()->isCharType()) {
+ auto elem_ty = const_arr_ty->getElementType();
3155
+ if (elem_ty->isIntegerType() && !elem_ty->isEnumeralType()) {
3156
StrCat(std::format("[0; {}]", const_arr_ty->getSize().getZExtValue()));
3157
return false;
3158
}
0 commit comments