Skip to content

Commit 1645da1

Browse files
committed
Short-circuit ConvertPointeeType for integer types
1 parent 747195b commit 1645da1

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

cpp2rust/converter/models/converter_refcount.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2158,6 +2158,10 @@ std::string ConverterRefCount::ConvertMappedMethodCall(
21582158
}
21592159

21602160
std::string ConverterRefCount::ConvertPointeeType(clang::QualType ptr_type) {
2161+
if (ptr_type->getPointeeType()->isIntegerType()) {
2162+
return ToString(ptr_type->getPointeeType());
2163+
}
2164+
21612165
// Pointee of a pointer to incomplete type is an incomplete type that does
21622166
// not have a translation rule. Hence ToString(ptr_type->getPointeeType()) is
21632167
// not enough

0 commit comments

Comments
 (0)