castdump:use UnderlyingType instead CanonicalType

This commit is contained in:
luoliwoshang
2024-09-05 14:58:23 +08:00
parent 7a068450b3
commit e56dc2ed6a

View File

@@ -61,7 +61,9 @@ func printType(t clang.Type, data *Data) {
case clang.TypeIncompleteArray, clang.TypeVariableArray, clang.TypeDependentSizedArray, clang.TypeConstantArray:
printType(t.ArrayElementType(), data)
case clang.TypeTypedef:
printType(t.CanonicalType(), data)
printType(t.TypeDeclaration().TypedefDeclUnderlyingType(), data)
case clang.TypeElaborated:
printType(t.NamedType(), data)
case clang.TypeFunctionProto:
printType(t.ResultType(), data)
for i := 0; i < int(t.NumArgTypes()); i++ {